aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-01-27 04:29:48 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2018-03-12 19:05:31 -0400
commit4d817ae099883b08fddd46dee3a916bbf93e9161 (patch)
treeb228d113b231971ef73a24097a21d785feb0863a
parentb94929d975c8423defc9aededb0f499ff936b509 (diff)
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>
-rw-r--r--fs/f2fs/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 3db1f02ed8c2..9587ca0bcd3e 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -699,6 +699,13 @@ static int parse_options(struct super_block *sb, char *options)
699 } 699 }
700 700
701 if (test_opt(sbi, INLINE_XATTR_SIZE)) { 701 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 }
702 if (!test_opt(sbi, INLINE_XATTR)) { 709 if (!test_opt(sbi, INLINE_XATTR)) {
703 f2fs_msg(sb, KERN_ERR, 710 f2fs_msg(sb, KERN_ERR,
704 "inline_xattr_size option should be " 711 "inline_xattr_size option should be "