summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-01-02 22:03:19 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-04 09:48:25 +0300
commit6279398db76cb7dcdafe42b34273b43a5144e304 (patch)
tree7ae766c58c5ebcd63eeeea483e4b9aa4be20ac9a /fs
parentb1ca321d1cd8f09965e7306ccf3998c7eb7e7b19 (diff)
downloadlinux-6279398db76cb7dcdafe42b34273b43a5144e304.tar.xz
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')
-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)) {