Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1597eac8 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: fix to restrict mount condition when without CONFIG_QUOTA



Like quota_ino feature, we need to reject mounting RDWR with image
which enables project_quota feature when there is no CONFIG_QUOTA
be set in kernel.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent bab53a17
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -775,6 +775,12 @@ static int parse_options(struct super_block *sb, char *options)
			 "without CONFIG_QUOTA");
			 "without CONFIG_QUOTA");
		return -EINVAL;
		return -EINVAL;
	}
	}
	if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) {
		f2fs_msg(sb, KERN_ERR,
			"Filesystem with project quota feature cannot be "
			"mounted RDWR without CONFIG_QUOTA");
		return -EINVAL;
	}
#endif
#endif


	if (F2FS_IO_SIZE_BITS(sbi) && !test_opt(sbi, LFS)) {
	if (F2FS_IO_SIZE_BITS(sbi) && !test_opt(sbi, LFS)) {