]> git.karo-electronics.de Git - linux-beck.git/commitdiff
f2fs: reuse get_extent_info
authorChao Yu <yuchao0@huawei.com>
Wed, 4 May 2016 15:19:47 +0000 (23:19 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 7 May 2016 17:32:29 +0000 (10:32 -0700)
Reuse get_extent_info for readability.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/extent_cache.c
fs/f2fs/f2fs.h

index c859bb04472807e20ef3c0742080023b54bdc196..5bfcdb9b69f2e5841896788153130629d965f5b9 100644 (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))
index ea146a599b4c192b2e43a78bb14b023d26ff9785..ccf8bf4debfcc09e874c6e73b5c9db11b592b0a4 100644 (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,