mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: restrict inline_xattr_size configuration
@ 2018-01-27  9:29 Chao Yu
  2018-01-27  9:29 ` [PATCH 2/2] f2fs: fix to check extent cache in f2fs_drop_extent_tree Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Chao Yu @ 2018-01-27  9:29 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

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>
---
 fs/f2fs/super.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8173ae688814..a859372457eb 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)
 	}
 
 	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 "
-- 
2.15.0.55.gc2ece9dc4de6

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-27  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27  9:29 [PATCH 1/2] f2fs: restrict inline_xattr_size configuration Chao Yu
2018-01-27  9:29 ` [PATCH 2/2] f2fs: fix to check extent cache in f2fs_drop_extent_tree Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®