summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-01-02 11:03:19 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-03 22:48:25 -0800
commit6279398db76cb7dcdafe42b34273b43a5144e304 (patch)
tree7ae766c58c5ebcd63eeeea483e4b9aa4be20ac9a /fs/f2fs/super.c
parentb1ca321d1cd8f09965e7306ccf3998c7eb7e7b19 (diff)
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 <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
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)) {