Commit 12e97296 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Stefan Bader

f2fs: fix missing up_read

BugLink: https://bugs.launchpad.net/bugs/1818797

commit 89d13c38 upstream.

This patch fixes missing up_read call.

Fixes: c9b60788 ("f2fs: fix to do sanity check with block address in main area")
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 9e2691b3
......@@ -1342,8 +1342,10 @@ static int f2fs_write_node_page(struct page *page,
}
if (__is_valid_data_blkaddr(ni.blk_addr) &&
!f2fs_is_valid_blkaddr(sbi, ni.blk_addr, DATA_GENERIC))
!f2fs_is_valid_blkaddr(sbi, ni.blk_addr, DATA_GENERIC)) {
up_read(&sbi->node_write);
goto redirty_out;
}
set_page_writeback(page);
fio.blk_addr = ni.blk_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment