diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-09-27 22:15:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:39 -0800 |
commit | d224115ac1229d4a74dd023703dd024ff2c6a383 (patch) | |
tree | f54f11b45d526b1f355c64dc6accc384e0180ce0 /fs | |
parent | 4561194f4c4cde3c37e90216b408cc4ffc3901dd (diff) | |
download | linux-stable-d224115ac1229d4a74dd023703dd024ff2c6a383.tar.gz linux-stable-d224115ac1229d4a74dd023703dd024ff2c6a383.tar.bz2 linux-stable-d224115ac1229d4a74dd023703dd024ff2c6a383.zip |
f2fs: fix missing up_read
commit 89d13c38501df730cbb2e02c4499da1b5187119d upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/node.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index fe5c9ff92772..96e6f47862a5 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1542,8 +1542,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; |