diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-08-19 12:48:22 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-08-21 12:20:29 -0400 |
commit | 6f12ac25f0167adb5d9ad5547fd6838380261e5c (patch) | |
tree | ec8f77b55575043f65b145372559f673b599e478 | |
parent | 97c3c5cac2bba0ecc4b0de83d33a23aa427ef628 (diff) |
f2fs: trigger release_dirty_inode in f2fs_put_super
The generic_shutdown_super calls sync_filesystem, evict_inode, and then
f2fs_put_super. In f2fs_evict_inode, we remain some dirty inode information
so we should release them at f2fs_put_super.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/checkpoint.c | 2 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 1 | ||||
-rw-r--r-- | fs/f2fs/super.c | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 7e1c13bfb99f..f14af912a146 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c | |||
@@ -348,7 +348,7 @@ bool exist_written_data(struct f2fs_sb_info *sbi, nid_t ino, int mode) | |||
348 | return e ? true : false; | 348 | return e ? true : false; |
349 | } | 349 | } |
350 | 350 | ||
351 | static void release_dirty_inode(struct f2fs_sb_info *sbi) | 351 | void release_dirty_inode(struct f2fs_sb_info *sbi) |
352 | { | 352 | { |
353 | struct ino_entry *e, *tmp; | 353 | struct ino_entry *e, *tmp; |
354 | int i; | 354 | int i; |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index cc5ead1bd378..cc89a7f490a6 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1262,6 +1262,7 @@ int ra_meta_pages(struct f2fs_sb_info *, int, int, int); | |||
1262 | long sync_meta_pages(struct f2fs_sb_info *, enum page_type, long); | 1262 | long sync_meta_pages(struct f2fs_sb_info *, enum page_type, long); |
1263 | void add_dirty_inode(struct f2fs_sb_info *, nid_t, int type); | 1263 | void add_dirty_inode(struct f2fs_sb_info *, nid_t, int type); |
1264 | void remove_dirty_inode(struct f2fs_sb_info *, nid_t, int type); | 1264 | void remove_dirty_inode(struct f2fs_sb_info *, nid_t, int type); |
1265 | void release_dirty_inode(struct f2fs_sb_info *); | ||
1265 | bool exist_written_data(struct f2fs_sb_info *, nid_t, int); | 1266 | bool exist_written_data(struct f2fs_sb_info *, nid_t, int); |
1266 | int acquire_orphan_inode(struct f2fs_sb_info *); | 1267 | int acquire_orphan_inode(struct f2fs_sb_info *); |
1267 | void release_orphan_inode(struct f2fs_sb_info *); | 1268 | void release_orphan_inode(struct f2fs_sb_info *); |
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 60e3554a6eb4..7a5477915d99 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -435,6 +435,9 @@ static void f2fs_put_super(struct super_block *sb) | |||
435 | if (sbi->s_dirty) | 435 | if (sbi->s_dirty) |
436 | write_checkpoint(sbi, true); | 436 | write_checkpoint(sbi, true); |
437 | 437 | ||
438 | /* normally superblock is clean, so we need to release this */ | ||
439 | release_dirty_inode(sbi); | ||
440 | |||
438 | iput(sbi->node_inode); | 441 | iput(sbi->node_inode); |
439 | iput(sbi->meta_inode); | 442 | iput(sbi->meta_inode); |
440 | 443 | ||