Commit b323fd28 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: kill F2FS_INLINE_XATTR_ADDRS for cleanup

Use get_inline_xattr_addrs directly instead of F2FS_INLINE_XATTR_ADDRS.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent d7997e63
...@@ -1200,7 +1200,7 @@ static int f2fs_xattr_fiemap(struct inode *inode, ...@@ -1200,7 +1200,7 @@ static int f2fs_xattr_fiemap(struct inode *inode,
phys = (__u64)blk_to_logical(inode, ni.blk_addr); phys = (__u64)blk_to_logical(inode, ni.blk_addr);
offset = offsetof(struct f2fs_inode, i_addr) + offset = offsetof(struct f2fs_inode, i_addr) +
sizeof(__le32) * (DEF_ADDRS_PER_INODE - sizeof(__le32) * (DEF_ADDRS_PER_INODE -
F2FS_INLINE_XATTR_ADDRS(inode)); get_inline_xattr_addrs(inode));
phys += offset; phys += offset;
len = inline_xattr_size(inode); len = inline_xattr_size(inode);
......
...@@ -414,10 +414,9 @@ struct f2fs_flush_device { ...@@ -414,10 +414,9 @@ struct f2fs_flush_device {
#define DEF_MIN_INLINE_SIZE 1 #define DEF_MIN_INLINE_SIZE 1
static inline int get_extra_isize(struct inode *inode); static inline int get_extra_isize(struct inode *inode);
static inline int get_inline_xattr_addrs(struct inode *inode); static inline int get_inline_xattr_addrs(struct inode *inode);
#define F2FS_INLINE_XATTR_ADDRS(inode) get_inline_xattr_addrs(inode)
#define MAX_INLINE_DATA(inode) (sizeof(__le32) * \ #define MAX_INLINE_DATA(inode) (sizeof(__le32) * \
(CUR_ADDRS_PER_INODE(inode) - \ (CUR_ADDRS_PER_INODE(inode) - \
F2FS_INLINE_XATTR_ADDRS(inode) - \ get_inline_xattr_addrs(inode) - \
DEF_INLINE_RESERVED_SIZE)) DEF_INLINE_RESERVED_SIZE))
/* for inline dir */ /* for inline dir */
...@@ -2324,7 +2323,7 @@ static inline int f2fs_has_inline_xattr(struct inode *inode) ...@@ -2324,7 +2323,7 @@ static inline int f2fs_has_inline_xattr(struct inode *inode)
static inline unsigned int addrs_per_inode(struct inode *inode) static inline unsigned int addrs_per_inode(struct inode *inode)
{ {
return CUR_ADDRS_PER_INODE(inode) - F2FS_INLINE_XATTR_ADDRS(inode); return CUR_ADDRS_PER_INODE(inode) - get_inline_xattr_addrs(inode);
} }
static inline void *inline_xattr_addr(struct inode *inode, struct page *page) static inline void *inline_xattr_addr(struct inode *inode, struct page *page)
...@@ -2332,7 +2331,7 @@ static inline void *inline_xattr_addr(struct inode *inode, struct page *page) ...@@ -2332,7 +2331,7 @@ static inline void *inline_xattr_addr(struct inode *inode, struct page *page)
struct f2fs_inode *ri = F2FS_INODE(page); struct f2fs_inode *ri = F2FS_INODE(page);
return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE -
F2FS_INLINE_XATTR_ADDRS(inode)]); get_inline_xattr_addrs(inode)]);
} }
static inline int inline_xattr_size(struct inode *inode) static inline int inline_xattr_size(struct inode *inode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment