diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2013-07-15 17:57:38 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-07-30 15:17:02 +0900 |
commit | 4559071063270999d016c92a0b9241692cbbb522 (patch) | |
tree | 06e530ac8b0d5e80c4bd15011f019f666689279b /fs/f2fs/node.c | |
parent | 963d4f7d7be6f9dba77362941921c33034fee91e (diff) | |
download | op-kernel-dev-4559071063270999d016c92a0b9241692cbbb522.zip op-kernel-dev-4559071063270999d016c92a0b9241692cbbb522.tar.gz |
f2fs: introduce help function F2FS_NODE()
Introduce help function F2FS_NODE() to simplify the conversion of node_page to
f2fs_node.
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index b418aee..f5172e2 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -565,7 +565,7 @@ static int truncate_nodes(struct dnode_of_data *dn, unsigned int nofs, return PTR_ERR(page); } - rn = (struct f2fs_node *)page_address(page); + rn = F2FS_NODE(page); if (depth < 3) { for (i = ofs; i < NIDS_PER_BLOCK; i++, freed++) { child_nid = le32_to_cpu(rn->in.nid[i]); @@ -698,7 +698,7 @@ restart: set_new_dnode(&dn, inode, page, NULL, 0); unlock_page(page); - rn = page_address(page); + rn = F2FS_NODE(page); switch (level) { case 0: case 1: @@ -1484,8 +1484,8 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) SetPageUptodate(ipage); fill_node_footer(ipage, ino, ino, 0, true); - src = (struct f2fs_node *)page_address(page); - dst = (struct f2fs_node *)page_address(ipage); + src = F2FS_NODE(page); + dst = F2FS_NODE(ipage); memcpy(dst, src, (unsigned long)&src->i.i_ext - (unsigned long)&src->i); dst->i.i_size = 0; @@ -1535,7 +1535,7 @@ int restore_node_summary(struct f2fs_sb_info *sbi, goto out; lock_page(page); - rn = (struct f2fs_node *)page_address(page); + rn = F2FS_NODE(page); sum_entry->nid = rn->footer.nid; sum_entry->version = 0; sum_entry->ofs_in_node = 0; |