Skip to content

Commit 539d334

Browse files
ColinIanKingJaegeuk Kim
authored andcommitted
f2fs: remove redundant assignment to variable err
The variable err is being assigned a value zero and then the following goto page_hit reassigns err a new value. The zero assignment is redundant and can be removed. Signed-off-by: Colin Ian King <[email protected]> [Jaegeuk Kim: clean up braces and if condition, suggested by Dan Carpenter] Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 0af2f6b commit 539d334

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/f2fs/node.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,12 +1494,10 @@ static struct folio *__get_node_folio(struct f2fs_sb_info *sbi, pgoff_t nid,
14941494
return folio;
14951495

14961496
err = read_node_page(&folio->page, 0);
1497-
if (err < 0) {
1497+
if (err < 0)
14981498
goto out_put_err;
1499-
} else if (err == LOCKED_PAGE) {
1500-
err = 0;
1499+
if (err == LOCKED_PAGE)
15011500
goto page_hit;
1502-
}
15031501

15041502
if (parent)
15051503
f2fs_ra_node_pages(parent, start + 1, MAX_RA_NODE);

0 commit comments

Comments
 (0)