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

Commit 4d817ae0 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: restrict inline_xattr_size configuration



This patch limits to enable inline_xattr_size mount option only if
both extra_attr and flexible_inline_xattr feature is on in current
image.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent b94929d9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -699,6 +699,13 @@ static int parse_options(struct super_block *sb, char *options)
	}

	if (test_opt(sbi, INLINE_XATTR_SIZE)) {
		if (!f2fs_sb_has_extra_attr(sb) ||
			!f2fs_sb_has_flexible_inline_xattr(sb)) {
			f2fs_msg(sb, KERN_ERR,
					"extra_attr or flexible_inline_xattr "
					"feature is off");
			return -EINVAL;
		}
		if (!test_opt(sbi, INLINE_XATTR)) {
			f2fs_msg(sb, KERN_ERR,
					"inline_xattr_size option should be "