summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-09-27 22:15:31 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2018-09-28 19:11:38 -0700
commit89d13c38501df730cbb2e02c4499da1b5187119d (patch)
tree99079126b1bbfe4b6cc70e7e221405f4b841ebd1 /fs/f2fs
parent61f7725aa148ee870436a29d3a24d5c00ab7e9af (diff)
downloadlinux-89d13c38501df730cbb2e02c4499da1b5187119d.tar.gz
linux-89d13c38501df730cbb2e02c4499da1b5187119d.tar.bz2
linux-89d13c38501df730cbb2e02c4499da1b5187119d.zip
f2fs: fix missing up_read
This patch fixes missing up_read call. Fixes: c9b60788fc76 ("f2fs: fix to do sanity check with block address in main area") Cc: <stable@vger.kernel.org> # 4.19+ Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/node.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 3994b44541b4..acb819b8fc42 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1541,8 +1541,10 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
}
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;
+ }
if (atomic && !test_opt(sbi, NOBARRIER))
fio.op_flags |= REQ_PREFLUSH | REQ_FUA;