From: Jaegeuk Kim Date: Tue, 2 Jan 2018 19:03:19 +0000 (-0800) Subject: f2fs: enable quota at remount from r to w X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6279398db76cb7dcdafe42b34273b43a5144e304;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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)) {