aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-02-04 23:03:57 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-02-17 00:58:53 -0500
commit203681f65b07055259bd475a6281136615b4e9a4 (patch)
tree81d75a7d692542c64f5bc7d724d0ebe51b98d382 /fs/f2fs/gc.c
parentbd859c6598dd2b73c517b3a36ecc5dd387eb1eb2 (diff)
f2fs: fix f2fs_write_meta_page at no checkpoint status
If f2fs entered errorneous checkpoint status, it should skip writing meta pages instead of redirtying the pages out. Otherwise, it cannot unmount the partition even though f2fs is under read-only status. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index ea0371e854b4..b0f57628fe55 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -701,6 +701,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi)
701gc_more: 701gc_more:
702 if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE))) 702 if (unlikely(!(sbi->sb->s_flags & MS_ACTIVE)))
703 goto stop; 703 goto stop;
704 if (unlikely(is_set_ckpt_flags(F2FS_CKPT(sbi), CP_ERROR_FLAG)))
705 goto stop;
704 706
705 if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) { 707 if (gc_type == BG_GC && has_not_enough_free_secs(sbi, nfree)) {
706 gc_type = FG_GC; 708 gc_type = FG_GC;