parent
40ea28867d
commit
f8d6b01e99
|
@ -271,7 +271,7 @@ static s64 ntfs_device_unix_io_pwrite(struct ntfs_device *dev, const void *buf,
|
|||
*/
|
||||
static int ntfs_device_unix_io_sync(struct ntfs_device *dev)
|
||||
{
|
||||
if (!NDevReadOnly(dev) && NDevDirty(dev)) {
|
||||
if (!NDevReadOnly(dev)) {
|
||||
int res = fsync(DEV_FD(dev));
|
||||
if (!res)
|
||||
NDevClearDirty(dev);
|
||||
|
|
|
@ -114,8 +114,7 @@ static void __ntfs_volume_release(ntfs_volume *v)
|
|||
if (v->dev) {
|
||||
struct ntfs_device *dev = v->dev;
|
||||
|
||||
if (NDevDirty(dev))
|
||||
dev->d_ops->sync(dev);
|
||||
dev->d_ops->sync(dev);
|
||||
if (dev->d_ops->close(dev))
|
||||
ntfs_log_perror("Failed to close the device");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue