diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-27 03:32:01 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-28 08:03:05 +0200 |
commit | 3b10b1fd2b6bc82eeb346ff6a6621d065908ea6d (patch) | |
tree | d29a8041d0f71158e7a0a453e710216d73a8feaa /fs/f2fs | |
parent | f2fs: return proper error from start_gc_thread (diff) | |
download | linux-3b10b1fd2b6bc82eeb346ff6a6621d065908ea6d.tar.xz linux-3b10b1fd2b6bc82eeb346ff6a6621d065908ea6d.zip |
f2fs: iput only if whole data blocks are flushed
If there remains some unwritten blocks from the recovery, we should not call
iput on that directory inode.
Otherwise, we can loose some dentry blocks after the recovery.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/checkpoint.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 01ddc911ac9b..0d3701dce462 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -501,8 +501,10 @@ void remove_dirty_dir_inode(struct inode *inode) return; spin_lock(&sbi->dir_inode_lock); - if (atomic_read(&F2FS_I(inode)->dirty_dents)) - goto out; + if (atomic_read(&F2FS_I(inode)->dirty_dents)) { + spin_unlock(&sbi->dir_inode_lock); + return; + } list_for_each(this, head) { struct dir_inode_entry *entry; @@ -516,7 +518,6 @@ void remove_dirty_dir_inode(struct inode *inode) break; } } -out: spin_unlock(&sbi->dir_inode_lock); /* Only from the recovery routine */ |