Skip to contentSkip to conversation

f2fs: enable quota at remount from r to w

PATCH In review Jaegeuk Kim 2 participants 2 messages Jan 3, 2018 – Jan 4, 2018 F2FS file system

lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 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)

---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/super.c +1 -1
index 3c62492b6a0d..8157f39f8539 100644
@@ -1283,7 +1283,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 &= ~MS_RDONLY;
 		if (sb_any_quota_suspended(sb)) {
Signature · 1 line
2.15.0.531.g2ccb3012c9-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jaegeuk Kim

We have to enable quota only when remounting from read to write. Otherwise, we'll get remount failure. (e.g., write to write case)

Thanks,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot