f2fs: cleanup MIN_INLINE_XATTR_SIZE

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Sheng Yong 2023-06-12 11:01:17 +08:00 committed by Jaegeuk Kim
parent c571fbb5b5
commit dde38c03b3
2 changed files with 2 additions and 1 deletions

View 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 ||

View 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) - \