diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-01-17 03:31:36 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-01-22 17:56:51 -0500 |
commit | b323fd28bbf95c3181e02e7a642b7d24f3e32714 (patch) | |
tree | 604d32742a8f3137650d6360f68ca46e891a920d | |
parent | d7997e63684c98d93defac0c99f589778bc71869 (diff) |
f2fs: kill F2FS_INLINE_XATTR_ADDRS for cleanup
Use get_inline_xattr_addrs directly instead of F2FS_INLINE_XATTR_ADDRS.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/data.c | 2 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 2db26388b6bf..2b892a619d71 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -1200,7 +1200,7 @@ static int f2fs_xattr_fiemap(struct inode *inode, | |||
1200 | phys = (__u64)blk_to_logical(inode, ni.blk_addr); | 1200 | phys = (__u64)blk_to_logical(inode, ni.blk_addr); |
1201 | offset = offsetof(struct f2fs_inode, i_addr) + | 1201 | offset = offsetof(struct f2fs_inode, i_addr) + |
1202 | sizeof(__le32) * (DEF_ADDRS_PER_INODE - | 1202 | sizeof(__le32) * (DEF_ADDRS_PER_INODE - |
1203 | F2FS_INLINE_XATTR_ADDRS(inode)); | 1203 | get_inline_xattr_addrs(inode)); |
1204 | 1204 | ||
1205 | phys += offset; | 1205 | phys += offset; |
1206 | len = inline_xattr_size(inode); | 1206 | len = inline_xattr_size(inode); |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 269f9dec3d49..f2656d0e28f2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -414,10 +414,9 @@ struct f2fs_flush_device { | |||
414 | #define DEF_MIN_INLINE_SIZE 1 | 414 | #define DEF_MIN_INLINE_SIZE 1 |
415 | static inline int get_extra_isize(struct inode *inode); | 415 | static inline int get_extra_isize(struct inode *inode); |
416 | static inline int get_inline_xattr_addrs(struct inode *inode); | 416 | static inline int get_inline_xattr_addrs(struct inode *inode); |
417 | #define F2FS_INLINE_XATTR_ADDRS(inode) get_inline_xattr_addrs(inode) | ||
418 | #define MAX_INLINE_DATA(inode) (sizeof(__le32) * \ | 417 | #define MAX_INLINE_DATA(inode) (sizeof(__le32) * \ |
419 | (CUR_ADDRS_PER_INODE(inode) - \ | 418 | (CUR_ADDRS_PER_INODE(inode) - \ |
420 | F2FS_INLINE_XATTR_ADDRS(inode) - \ | 419 | get_inline_xattr_addrs(inode) - \ |
421 | DEF_INLINE_RESERVED_SIZE)) | 420 | DEF_INLINE_RESERVED_SIZE)) |
422 | 421 | ||
423 | /* for inline dir */ | 422 | /* for inline dir */ |
@@ -2324,7 +2323,7 @@ static inline int f2fs_has_inline_xattr(struct inode *inode) | |||
2324 | 2323 | ||
2325 | static inline unsigned int addrs_per_inode(struct inode *inode) | 2324 | static inline unsigned int addrs_per_inode(struct inode *inode) |
2326 | { | 2325 | { |
2327 | return CUR_ADDRS_PER_INODE(inode) - F2FS_INLINE_XATTR_ADDRS(inode); | 2326 | return CUR_ADDRS_PER_INODE(inode) - get_inline_xattr_addrs(inode); |
2328 | } | 2327 | } |
2329 | 2328 | ||
2330 | static inline void *inline_xattr_addr(struct inode *inode, struct page *page) | 2329 | 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 | struct f2fs_inode *ri = F2FS_INODE(page); | 2331 | struct f2fs_inode *ri = F2FS_INODE(page); |
2333 | 2332 | ||
2334 | return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - | 2333 | return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - |
2335 | F2FS_INLINE_XATTR_ADDRS(inode)]); | 2334 | get_inline_xattr_addrs(inode)]); |
2336 | } | 2335 | } |
2337 | 2336 | ||
2338 | static inline int inline_xattr_size(struct inode *inode) | 2337 | static inline int inline_xattr_size(struct inode *inode) |