]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ntfs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call
authorChristoph Hellwig <hch@lst.de>
Wed, 21 Feb 2018 15:54:47 +0000 (07:54 -0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 28 Mar 2018 05:39:02 +0000 (01:39 -0400)
I_DIRTY_DATASYNC is a strict superset of I_DIRTY_SYNC semantics, as
in mark dirty to be written out by fdatasync as well.  So dirtying
for both flags makes no sense.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ntfs/mft.c

index 2831f495a6740087c86547582e81cd40735c5e60..32c523cf5a2d99d2accd219a08907de938571d0a 100644 (file)
@@ -381,7 +381,7 @@ unm_err_out:
  * vfs inode dirty.  This ensures that any changes to the mft record are
  * written out to disk.
  *
- * NOTE:  We only set I_DIRTY_SYNC and I_DIRTY_DATASYNC (and not I_DIRTY_PAGES)
+ * NOTE:  We only set I_DIRTY_DATASYNC (and not I_DIRTY_PAGES)
  * on the base vfs inode, because even though file data may have been modified,
  * it is dirty in the inode meta data rather than the data page cache of the
  * inode, and thus there are no data pages that need writing out.  Therefore, a
@@ -407,7 +407,7 @@ void __mark_mft_record_dirty(ntfs_inode *ni)
        else
                base_ni = ni->ext.base_ntfs_ino;
        mutex_unlock(&ni->extent_lock);
-       __mark_inode_dirty(VFS_I(base_ni), I_DIRTY_SYNC | I_DIRTY_DATASYNC);
+       __mark_inode_dirty(VFS_I(base_ni), I_DIRTY_DATASYNC);
 }
 
 static const char *ntfs_please_email = "Please email "