Skip to content

Commit

Permalink
f2fs: reorganize code for ra_node_page
Browse files Browse the repository at this point in the history
We can remove unneeded label unlock_out, avoid unnecessary jump
and reorganize the returning conditions in this function.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Namjae Jeon authored and Jaegeuk Kim committed Feb 11, 2013
1 parent 3786dfd commit a2b52a5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,15 +874,11 @@ void ra_node_page(struct f2fs_sb_info *sbi, nid_t nid)
return;

if (read_node_page(apage, READA))
goto unlock_out;
unlock_page(apage);

page_cache_release(apage);
return;

unlock_out:
unlock_page(apage);
release_out:
page_cache_release(apage);
return;
}

struct page *get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid)
Expand Down

0 comments on commit a2b52a5

Please sign in to comment.