f2fs: fix iget/iput of dir during recovery
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Wed, 5 Jun 2013 08:42:45 +0000 (17:42 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 7 Jun 2013 04:21:37 +0000 (13:21 +0900)
commit5deb82671ae344b28b4e744020afcbc76df1779b
treefeb0b69de6f1c272f3c9e8fe862f6148770684da
parentb2b3460a9404136e0a99b9f7cb56e08ec41ea933
f2fs: fix iget/iput of dir during recovery

It is possible that iput is skipped after iget during the recovery.

In recover_dentry(),
 dir = f2fs_iget();
 ...
 if (de && inode->i_ino == le32_to_cpu(de->ino))
goto out;

In this case, this dir is not able to be added in dirty_dir_inode_list.
The actual linking is done only when set_page_dirty() is called.

So let's add this newly got inode into the list explicitly, and put it at the
end of the recovery routine.

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