Commit a35749b1 authored by Daeho Jeong's avatar Daeho Jeong Committed by Jaegeuk Kim
Browse files

f2fs: adjust unusable cap before checkpoint=disable mode



The unusable cap value must be adjusted before checking whether
checkpoint=disable is feasible.

Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 6787a822
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2496,6 +2496,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
		}
	}

	adjust_unusable_cap_perc(sbi);
	if (enable_checkpoint == !!test_opt(sbi, DISABLE_CHECKPOINT)) {
		if (test_opt(sbi, DISABLE_CHECKPOINT)) {
			err = f2fs_disable_checkpoint(sbi);
@@ -2540,7 +2541,6 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
		(test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);

	limit_reserve_root(sbi);
	adjust_unusable_cap_perc(sbi);
	*flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME);
	return 0;
restore_checkpoint: