diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-05 12:42:45 +0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-07 08:21:37 +0400 |
commit | 5deb82671ae344b28b4e744020afcbc76df1779b (patch) | |
tree | feb0b69de6f1c272f3c9e8fe862f6148770684da /fs/f2fs/recovery.c | |
parent | b2b3460a9404136e0a99b9f7cb56e08ec41ea933 (diff) | |
download | linux-5deb82671ae344b28b4e744020afcbc76df1779b.tar.xz |
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>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 539ca32f4483..ddde14f0eacb 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -58,6 +58,7 @@ static int recover_dentry(struct page *ipage, struct inode *inode) goto out; } set_inode_flag(F2FS_I(dir), FI_DELAY_IPUT); + add_dirty_dir_inode(dir); } name.len = le32_to_cpu(raw_inode->i_namelen); |