Skip to content

Commit

Permalink
f2fs: fix missing up_read
Browse files Browse the repository at this point in the history
This patch fixes missing up_read call.

Fixes: c9b6078 ("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>
  • Loading branch information
Jaegeuk Kim committed Sep 29, 2018
1 parent 61f7725 commit 89d13c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 89d13c3

Please sign in to comment.