From 6279398db76cb7dcdafe42b34273b43a5144e304 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 2 Jan 2018 11:03:19 -0800 Subject: f2fs: enable quota at remount from r to w We have to enable quota only when remounting from read to write. Otherwise, we'll get remount failure. (e.g., write to write case) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/f2fs/super.c') diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f56230759b38..0a820ba55b10 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1265,7 +1265,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data) err = dquot_suspend(sb, -1); if (err < 0) goto restore_opts; - } else { + } else if (f2fs_readonly(sb) && !(*flags & MS_RDONLY)) { /* dquot_resume needs RW */ sb->s_flags &= ~SB_RDONLY; if (sb_any_quota_suspended(sb)) { -- cgit v1.2.3