aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-26 02:30:41 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-26 06:32:48 -0500
commit58bfaf44df58082c72882b235cae611c975537d4 (patch)
treeab4a56b2e152ccedab7cdfca92c536a1eb1ddec9 /fs/f2fs/recovery.c
parentd96b143151a11820ee3eee552554209f2453799e (diff)
f2fs: introduce F2FS_INODE macro to get f2fs_inode
This patch introduces F2FS_INODE that returns struct f2fs_inode * from the inode page. By using this macro, we can remove unnecessary casting codes like below. struct f2fs_inode *ri = &F2FS_NODE(inode_page)->i; -> struct f2fs_inode *ri = F2FS_INODE(inode_page); Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 4d411a26b85d..96e690b6f0fa 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -40,8 +40,7 @@ static struct fsync_inode_entry *get_fsync_inode(struct list_head *head,
40 40
41static int recover_dentry(struct page *ipage, struct inode *inode) 41static int recover_dentry(struct page *ipage, struct inode *inode)
42{ 42{
43 struct f2fs_node *raw_node = F2FS_NODE(ipage); 43 struct f2fs_inode *raw_inode = F2FS_INODE(ipage);
44 struct f2fs_inode *raw_inode = &(raw_node->i);
45 nid_t pino = le32_to_cpu(raw_inode->i_pino); 44 nid_t pino = le32_to_cpu(raw_inode->i_pino);
46 struct f2fs_dir_entry *de; 45 struct f2fs_dir_entry *de;
47 struct qstr name; 46 struct qstr name;
@@ -105,8 +104,7 @@ out:
105 104
106static int recover_inode(struct inode *inode, struct page *node_page) 105static int recover_inode(struct inode *inode, struct page *node_page)
107{ 106{
108 struct f2fs_node *raw_node = F2FS_NODE(node_page); 107 struct f2fs_inode *raw_inode = F2FS_INODE(node_page);
109 struct f2fs_inode *raw_inode = &(raw_node->i);
110 108
111 if (!IS_INODE(node_page)) 109 if (!IS_INODE(node_page))
112 return 0; 110 return 0;