diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-02-27 19:52:21 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-02-27 21:09:28 +0900 |
commit | 695fd1ed3bcaae9fc032cbe47f0fe9a934bf1717 (patch) | |
tree | 1d4b5dea7e8d60b3141696ecfea06fd1f0158cf0 /fs/f2fs/f2fs.h | |
parent | 81c1a0f13e6306a76fc3743b8504085d96659a5f (diff) | |
download | lwn-695fd1ed3bcaae9fc032cbe47f0fe9a934bf1717.tar.gz lwn-695fd1ed3bcaae9fc032cbe47f0fe9a934bf1717.zip |
f2fs: use existing macro to clean up some codes
This patch use existing macro F2FS_INODE/NEXT_FREE_BLKADDR to clean up some
codes.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index bd6666e1bf2f..8b2cb82f852b 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1000,8 +1000,7 @@ static inline unsigned int addrs_per_inode(struct f2fs_inode_info *fi) static inline void *inline_xattr_addr(struct page *page) { - struct f2fs_inode *ri; - ri = (struct f2fs_inode *)page_address(page); + struct f2fs_inode *ri = F2FS_INODE(page); return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - F2FS_INLINE_XATTR_ADDRS]); } @@ -1021,8 +1020,7 @@ static inline int f2fs_has_inline_data(struct inode *inode) static inline void *inline_data_addr(struct page *page) { - struct f2fs_inode *ri; - ri = (struct f2fs_inode *)page_address(page); + struct f2fs_inode *ri = F2FS_INODE(page); return (void *)&(ri->i_addr[1]); } |