Skip to content

Commit 06ccfb0

Browse files
fs/ntfs3: Write immediately updated ntfs state
Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 87d1888 commit 06ccfb0

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

fs/ntfs3/fsntfs.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -983,18 +983,11 @@ int ntfs_set_state(struct ntfs_sb_info *sbi, enum NTFS_DIRTY_FLAGS dirty)
983983
if (err)
984984
return err;
985985

986-
mark_inode_dirty(&ni->vfs_inode);
986+
mark_inode_dirty_sync(&ni->vfs_inode);
987987
/* verify(!ntfs_update_mftmirr()); */
988988

989-
/*
990-
* If we used wait=1, sync_inode_metadata waits for the io for the
991-
* inode to finish. It hangs when media is removed.
992-
* So wait=0 is sent down to sync_inode_metadata
993-
* and filemap_fdatawrite is used for the data blocks.
994-
*/
995-
err = sync_inode_metadata(&ni->vfs_inode, 0);
996-
if (!err)
997-
err = filemap_fdatawrite(ni->vfs_inode.i_mapping);
989+
/* write mft record on disk. */
990+
err = _ni_write_inode(&ni->vfs_inode, 1);
998991

999992
return err;
1000993
}

0 commit comments

Comments
 (0)