diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-10-07 20:30:33 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-10-07 20:32:43 -0400 |
commit | 5887d291d792773368f6eaf1759aad109bcd78eb (patch) | |
tree | 6a97459fda910eb2da63a7644987d20afdb36c3a /fs | |
parent | 4058c5117d6d8a94002fb308615c7442ed3a3896 (diff) |
f2fs: avoid unnecessary checkpoints
During the f2fs_put_super procedure, we don't need to conduct checkpoint all
the time, since we don't need to do that if superblock is clean.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/super.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index fde8e6aca9be..539c009d4138 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -372,7 +372,9 @@ static void f2fs_put_super(struct super_block *sb) | |||
372 | f2fs_destroy_stats(sbi); | 372 | f2fs_destroy_stats(sbi); |
373 | stop_gc_thread(sbi); | 373 | stop_gc_thread(sbi); |
374 | 374 | ||
375 | write_checkpoint(sbi, true); | 375 | /* We don't need to do checkpoint when it's clean */ |
376 | if (sbi->s_dirty && get_pages(sbi, F2FS_DIRTY_NODES)) | ||
377 | write_checkpoint(sbi, true); | ||
376 | 378 | ||
377 | iput(sbi->node_inode); | 379 | iput(sbi->node_inode); |
378 | iput(sbi->meta_inode); | 380 | iput(sbi->meta_inode); |