Commit bd933d4f authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: reuse get_extent_info

Reuse get_extent_info for readability.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent e3bc808c
...@@ -196,8 +196,7 @@ bool f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext) ...@@ -196,8 +196,7 @@ bool f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext)
if (!i_ext || !i_ext->len) if (!i_ext || !i_ext->len)
return false; return false;
set_extent_info(&ei, le32_to_cpu(i_ext->fofs), get_extent_info(&ei, i_ext);
le32_to_cpu(i_ext->blk), le32_to_cpu(i_ext->len));
write_lock(&et->lock); write_lock(&et->lock);
if (atomic_read(&et->node_cnt)) if (atomic_read(&et->node_cnt))
......
...@@ -428,11 +428,11 @@ struct f2fs_inode_info { ...@@ -428,11 +428,11 @@ struct f2fs_inode_info {
}; };
static inline void get_extent_info(struct extent_info *ext, 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->fofs = le32_to_cpu(i_ext->fofs);
ext->blk = le32_to_cpu(i_ext.blk); ext->blk = le32_to_cpu(i_ext->blk);
ext->len = le32_to_cpu(i_ext.len); ext->len = le32_to_cpu(i_ext->len);
} }
static inline void set_raw_extent(struct extent_info *ext, static inline void set_raw_extent(struct extent_info *ext,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment