f2fs: cleanup MIN_INLINE_XATTR_SIZE
authorSheng Yong <shengyong@oppo.com>
Mon, 12 Jun 2023 03:01:17 +0000 (11:01 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 26 Jun 2023 13:07:10 +0000 (06:07 -0700)
Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c
fs/f2fs/xattr.h

index 5b7d25f..1b2c788 100644 (file)
@@ -1363,7 +1363,7 @@ default_check:
                        return -EINVAL;
                }
 
-               min_size = sizeof(struct f2fs_xattr_header) / sizeof(__le32);
+               min_size = MIN_INLINE_XATTR_SIZE;
                max_size = MAX_INLINE_XATTR_SIZE;
 
                if (F2FS_OPTION(sbi).inline_xattr_size < min_size ||
index 416d652..b1811c3 100644 (file)
@@ -83,6 +83,7 @@ struct f2fs_xattr_entry {
                                sizeof(struct f2fs_xattr_header) -      \
                                sizeof(struct f2fs_xattr_entry))
 
+#define MIN_INLINE_XATTR_SIZE (sizeof(struct f2fs_xattr_header) / sizeof(__le32))
 #define MAX_INLINE_XATTR_SIZE                                          \
                        (DEF_ADDRS_PER_INODE -                          \
                        F2FS_TOTAL_EXTRA_ATTR_SIZE / sizeof(__le32) -   \