Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1394458 > unrolled thread

[PATCH 3/4] f2fs: reuse get_extent_info

Started byChao Yu <chao@kernel.org>
First post2016-05-04 17:30 +0200
Last post2016-05-04 17:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/4] f2fs: reuse get_extent_info Chao Yu <chao@kernel.org> - 2016-05-04 17:30 +0200

#1394458 — [PATCH 3/4] f2fs: reuse get_extent_info

FromChao Yu <chao@kernel.org>
Date2016-05-04 17:30 +0200
Subject[PATCH 3/4] f2fs: reuse get_extent_info
Message-ID<rv6Uq-6wS-7@gated-at.bofh.it>
From: Chao Yu <yuchao0@huawei.com>

Reuse get_extent_info for readability.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/extent_cache.c | 3 +--
 fs/f2fs/f2fs.h         | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index c859bb0..5bfcdb9 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -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))
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index a87625f..99c593f 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -417,11 +417,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,
-- 
2.7.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web