summaryrefslogtreecommitdiff
path: root/fs/ntfs3
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-06-30 14:57:19 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-09-28 15:03:56 +0300
commit06ccfb00645990a9fcc14249e6d1c25921ecb836 (patch)
tree888897382dacb30980bf243d22e814e5b0302c65 /fs/ntfs3
parent87d1888aa40f25773fa0b948bcb2545f97e2cb15 (diff)
downloadlinux-06ccfb00645990a9fcc14249e6d1c25921ecb836.tar.xz
fs/ntfs3: Write immediately updated ntfs state
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r--fs/ntfs3/fsntfs.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
index 33afee0f5559..edb51dc12f65 100644
--- a/fs/ntfs3/fsntfs.c
+++ b/fs/ntfs3/fsntfs.c
@@ -983,18 +983,11 @@ out:
if (err)
return err;
- mark_inode_dirty(&ni->vfs_inode);
+ mark_inode_dirty_sync(&ni->vfs_inode);
/* verify(!ntfs_update_mftmirr()); */
- /*
- * If we used wait=1, sync_inode_metadata waits for the io for the
- * inode to finish. It hangs when media is removed.
- * So wait=0 is sent down to sync_inode_metadata
- * and filemap_fdatawrite is used for the data blocks.
- */
- err = sync_inode_metadata(&ni->vfs_inode, 0);
- if (!err)
- err = filemap_fdatawrite(ni->vfs_inode.i_mapping);
+ /* write mft record on disk. */
+ err = _ni_write_inode(&ni->vfs_inode, 1);
return err;
}