lkml.org 
[lkml]   [2023]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 6.5 03/52] fs/ntfs3: Write immediately updated ntfs state
    Date
    From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

    [ Upstream commit 06ccfb00645990a9fcc14249e6d1c25921ecb836 ]

    Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/ntfs3/fsntfs.c | 13 +++----------
    1 file changed, 3 insertions(+), 10 deletions(-)

    diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
    index 33afee0f55593..edb51dc12f65f 100644
    --- a/fs/ntfs3/fsntfs.c
    +++ b/fs/ntfs3/fsntfs.c
    @@ -983,18 +983,11 @@ int ntfs_set_state(struct ntfs_sb_info *sbi, enum NTFS_DIRTY_FLAGS dirty)
    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;
    }
    --
    2.42.0
    \
     
     \ /
      Last update: 2023-10-29 23:55    [W:2.164 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site