Skip to content

Commit

Permalink
f2fs: fix wrong condition check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jaegeuk Kim committed May 28, 2013
1 parent 77888c1 commit b638f0c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/f2fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
ret = do_read_inode(inode);
if (ret)
goto bad_inode;

if (!sbi->por_doing && inode->i_nlink == 0) {
ret = -ENOENT;
goto bad_inode;
}

make_now:
if (ino == F2FS_NODE_INO(sbi)) {
inode->i_mapping->a_ops = &f2fs_node_aops;
Expand Down

0 comments on commit b638f0c

Please sign in to comment.