f2fs: avoid redundant call to has_not_enough_free_secs in f2fs_gc
authorNamjae Jeon <namjae.jeon@samsung.com>
Wed, 30 Jan 2013 13:47:02 +0000 (22:47 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 11 Feb 2013 22:15:00 +0000 (07:15 +0900)
commit3786dfdf4f00755ce5797c0e87eac8f898acb52c
tree6428ad37cb01e8d47d2d2bd17935620e9bddbf27
parentd6212a5f18c8f9f9cc884070a96e11907711217f
f2fs: avoid redundant call to has_not_enough_free_secs in f2fs_gc

After doing a write_checkpoint from garbage collection path if there is still
need to do more garbage collection, gc_more label is used to jump and start
the process again. And in that process, first step before getting victim is to
check if there are not enough free sections, which is already done before
doing a jump to gc_more. We can avoid the redundant call to check free
sections, by checking the gc_type flag which will remain FG_GC(value 1) under
this condition.

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>
fs/f2fs/gc.c