f2fs: reuse get_extent_info

Reuse get_extent_info for readability.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2016-05-04 23:19:47 +08:00 committed by Jaegeuk Kim
parent e3bc808ca8
commit bd933d4fae
2 changed files with 5 additions and 6 deletions

View File

@ -196,8 +196,7 @@ bool f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext)
if (!i_ext || !i_ext->len)
return false;
set_extent_info(&ei, le32_to_cpu(i_ext->fofs),
le32_to_cpu(i_ext->blk), le32_to_cpu(i_ext->len));
get_extent_info(&ei, i_ext);
write_lock(&et->lock);
if (atomic_read(&et->node_cnt))

View File

@ -428,11 +428,11 @@ struct f2fs_inode_info {
};
static inline void get_extent_info(struct extent_info *ext,
struct f2fs_extent i_ext)
struct f2fs_extent *i_ext)
{
ext->fofs = le32_to_cpu(i_ext.fofs);
ext->blk = le32_to_cpu(i_ext.blk);
ext->len = le32_to_cpu(i_ext.len);
ext->fofs = le32_to_cpu(i_ext->fofs);
ext->blk = le32_to_cpu(i_ext->blk);
ext->len = le32_to_cpu(i_ext->len);
}
static inline void set_raw_extent(struct extent_info *ext,