f2fs: fix wrong condition check
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 21 May 2013 01:17:56 +0000 (10:17 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 28 May 2013 06:03:03 +0000 (15:03 +0900)
commitb638f0c4b8fca9d2f82805a2d6601b09283e0d32
tree48c12176c2906dd53269e45aed43ac6210e03d64
parent77888c1e42e8c76e16204cd99c19a01829421402
f2fs: fix wrong condition check

While an orphan inode has zero link_count, f2fs_gc is able to select the inode
for foreground gc.

- f2fs_gc
 - do_garbage_collect
   - gc_data_segment
     : f2fs_iget is failed
     : get_valid_blocks() != 0, so that retry
--> here we got the infinite loop.

This patch resolved this issue.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/inode.c