diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-26 02:30:41 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-26 06:32:48 -0500 |
commit | 58bfaf44df58082c72882b235cae611c975537d4 (patch) | |
tree | ab4a56b2e152ccedab7cdfca92c536a1eb1ddec9 /fs/f2fs/dir.c | |
parent | d96b143151a11820ee3eee552554209f2453799e (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/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index f0b463049444..6da77e5c753b 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c | |||
@@ -261,12 +261,12 @@ void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de, | |||
261 | 261 | ||
262 | static void init_dent_inode(const struct qstr *name, struct page *ipage) | 262 | static void init_dent_inode(const struct qstr *name, struct page *ipage) |
263 | { | 263 | { |
264 | struct f2fs_node *rn; | 264 | struct f2fs_inode *ri; |
265 | 265 | ||
266 | /* copy name info. to this inode page */ | 266 | /* copy name info. to this inode page */ |
267 | rn = F2FS_NODE(ipage); | 267 | ri = F2FS_INODE(ipage); |
268 | rn->i.i_namelen = cpu_to_le32(name->len); | 268 | ri->i_namelen = cpu_to_le32(name->len); |
269 | memcpy(rn->i.i_name, name->name, name->len); | 269 | memcpy(ri->i_name, name->name, name->len); |
270 | set_page_dirty(ipage); | 270 | set_page_dirty(ipage); |
271 | } | 271 | } |
272 | 272 | ||