f2fs: cleanup if-statement of phase in gc_data_segment
Little cleanup to distinguish each phase easily Signed-off-by: Changman Lee <cm224.lee@samsung.com> [Jaegeuk Kim: modify indentation for code readability] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
95f5b0fc5e
commit
31a3268839
1 changed files with 17 additions and 17 deletions
34
fs/f2fs/gc.c
34
fs/f2fs/gc.c
|
@ -603,27 +603,27 @@ static void gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
|
|||
|
||||
data_page = find_data_page(inode,
|
||||
start_bidx + ofs_in_node, false);
|
||||
if (IS_ERR(data_page))
|
||||
goto next_iput;
|
||||
if (IS_ERR(data_page)) {
|
||||
iput(inode);
|
||||
continue;
|
||||
}
|
||||
|
||||
f2fs_put_page(data_page, 0);
|
||||
add_gc_inode(inode, ilist);
|
||||
} else {
|
||||
inode = find_gc_inode(dni.ino, ilist);
|
||||
if (inode) {
|
||||
start_bidx = start_bidx_of_node(nofs,
|
||||
F2FS_I(inode));
|
||||
data_page = get_lock_data_page(inode,
|
||||
start_bidx + ofs_in_node);
|
||||
if (IS_ERR(data_page))
|
||||
continue;
|
||||
move_data_page(inode, data_page, gc_type);
|
||||
stat_inc_data_blk_count(sbi, 1);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
/* phase 3 */
|
||||
inode = find_gc_inode(dni.ino, ilist);
|
||||
if (inode) {
|
||||
start_bidx = start_bidx_of_node(nofs, F2FS_I(inode));
|
||||
data_page = get_lock_data_page(inode,
|
||||
start_bidx + ofs_in_node);
|
||||
if (IS_ERR(data_page))
|
||||
continue;
|
||||
move_data_page(inode, data_page, gc_type);
|
||||
stat_inc_data_blk_count(sbi, 1);
|
||||
}
|
||||
continue;
|
||||
next_iput:
|
||||
iput(inode);
|
||||
}
|
||||
|
||||
if (++phase < 4)
|
||||
|
|
Loading…
Reference in a new issue