lkml.org 
[lkml]   [2018]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.18 104/131] f2fs: fix to wait on page writeback before updating page
    Date
    From: Chao Yu <yuchao0@huawei.com>

    [ Upstream commit 6aead1617b3adf2b7e2c56f0f13e4e0ee42ebb4a ]

    In error path of f2fs_move_rehashed_dirents, inode page could be writeback
    state, so we should wait on inode page writeback before updating it.

    Signed-off-by: Chao Yu <yuchao0@huawei.com>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    ---
    fs/f2fs/inline.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
    index f882de2ede95..2bcb2d36f024 100644
    --- a/fs/f2fs/inline.c
    +++ b/fs/f2fs/inline.c
    @@ -498,6 +498,7 @@ static int f2fs_move_rehashed_dirents(struct inode *dir, struct page *ipage,
    return 0;
    recover:
    lock_page(ipage);
    + f2fs_wait_on_page_writeback(ipage, NODE, true);
    memcpy(inline_dentry, backup_dentry, MAX_INLINE_DATA(dir));
    f2fs_i_depth_write(dir, 0);
    f2fs_i_size_write(dir, MAX_INLINE_DATA(dir));
    --
    2.17.1
    \
     
     \ /
      Last update: 2018-09-02 15:30    [W:15.454 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site