summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-09-02 15:31:18 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2014-09-03 17:37:13 -0700
commit4081363fbe84a7ebac6d3339dd2775df45d856d0 (patch)
tree1484b33d753ff03255077b77c3d8f1c45c67e6af /fs/f2fs/node.h
parent70c8038dd698b44daf7c8fc7e2eca142bec694c4 (diff)
downloadlinux-4081363fbe84a7ebac6d3339dd2775df45d856d0.tar.gz
linux-4081363fbe84a7ebac6d3339dd2775df45d856d0.tar.bz2
linux-4081363fbe84a7ebac6d3339dd2775df45d856d0.zip
f2fs: introduce F2FS_I_SB, F2FS_M_SB, and F2FS_P_SB
This patch adds three inline functions to clean up dirty casting codes. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 8a116a407599..b24f588a0fe4 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -197,8 +197,7 @@ static inline void copy_node_footer(struct page *dst, struct page *src)
static inline void fill_node_footer_blkaddr(struct page *page, block_t blkaddr)
{
- struct f2fs_sb_info *sbi = F2FS_SB(page->mapping->host->i_sb);
- struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
+ struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page));
struct f2fs_node *rn = F2FS_NODE(page);
rn->footer.cp_ver = ckpt->checkpoint_ver;