Skip to content

Commit

Permalink
f2fs: restrict inline_xattr_size configuration
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Mar 12, 2018
1 parent b94929d commit 4d817ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 4d817ae

Please sign in to comment.