summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-04-17 10:51:05 +0800
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-05-07 10:21:55 +0900
commit94dac22e72e891b16e8e8abbdb6df10f322d20e0 (patch)
treeb0519ec2534e4689527c25cd89723cc00b5304eb /fs/f2fs/node.h
parent876dc59eb1f0131c092803d0d206d47dd0119dfe (diff)
downloadop-kernel-dev-94dac22e72e891b16e8e8abbdb6df10f322d20e0.zip
op-kernel-dev-94dac22e72e891b16e8e8abbdb6df10f322d20e0.tar.gz
f2fs: introduce raw_nat_from_node_info() to simplfy codes
This patch introduce raw_nat_from_node_info() to simplfy some codes, and also use exist function node_info_from_raw_nat() to do the same job. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 5decc1a..41bb65b 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -75,6 +75,14 @@ static inline void node_info_from_raw_nat(struct node_info *ni,
ni->version = raw_ne->version;
}
+static inline void raw_nat_from_node_info(struct f2fs_nat_entry *raw_ne,
+ struct node_info *ni)
+{
+ raw_ne->ino = cpu_to_le32(ni->ino);
+ raw_ne->block_addr = cpu_to_le32(ni->blk_addr);
+ raw_ne->version = ni->version;
+}
+
enum nid_type {
FREE_NIDS, /* indicates the free nid list */
NAT_ENTRIES /* indicates the cached nat entry */
OpenPOWER on IntegriCloud