Skip to content

Commit 4d817ae

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent b94929d commit 4d817ae

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎fs/f2fs/super.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,13 @@ static int parse_options(struct super_block *sb, char *options)
699699
}
700700

701701
if (test_opt(sbi, INLINE_XATTR_SIZE)) {
702+
if (!f2fs_sb_has_extra_attr(sb) ||
703+
!f2fs_sb_has_flexible_inline_xattr(sb)) {
704+
f2fs_msg(sb, KERN_ERR,
705+
"extra_attr or flexible_inline_xattr "
706+
"feature is off");
707+
return -EINVAL;
708+
}
702709
if (!test_opt(sbi, INLINE_XATTR)) {
703710
f2fs_msg(sb, KERN_ERR,
704711
"inline_xattr_size option should be "

0 commit comments

Comments
 (0)