diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-12 11:55:02 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-19 20:05:48 -0500 |
commit | 3961f0e2775f84a8f81b0dcddb0b356ebfe0696b (patch) | |
tree | 908bf31a9a3ae79c8f122bdcaa6102e0996a6ac1 /fs/nilfs2 | |
parent | 8707df38478c8e0958b706f0ea1cdf99d00a9469 (diff) |
nilfs2: eliminate inlines to directly read/write inode of metadata files
Removes two inline functions: nilfs_mdt_read_inode_direct() and
nilfs_mdt_write_inode_direct().
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/mdt.h | 17 | ||||
-rw-r--r-- | fs/nilfs2/segment.c | 12 |
2 files changed, 6 insertions, 23 deletions
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index 3eb40e8d50ff..cd2903af3c30 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h | |||
@@ -105,21 +105,4 @@ static inline __u64 nilfs_mdt_cno(struct inode *inode) | |||
105 | #define nilfs_mdt_bgl_lock(inode, bg) \ | 105 | #define nilfs_mdt_bgl_lock(inode, bg) \ |
106 | (&NILFS_MDT(inode)->mi_bgl->locks[(bg) & (NR_BG_LOCKS-1)].lock) | 106 | (&NILFS_MDT(inode)->mi_bgl->locks[(bg) & (NR_BG_LOCKS-1)].lock) |
107 | 107 | ||
108 | |||
109 | static inline int | ||
110 | nilfs_mdt_read_inode_direct(struct inode *inode, struct buffer_head *bh, | ||
111 | unsigned n) | ||
112 | { | ||
113 | return nilfs_read_inode_common( | ||
114 | inode, (struct nilfs_inode *)(bh->b_data + n)); | ||
115 | } | ||
116 | |||
117 | static inline void | ||
118 | nilfs_mdt_write_inode_direct(struct inode *inode, struct buffer_head *bh, | ||
119 | unsigned n) | ||
120 | { | ||
121 | nilfs_write_inode_common( | ||
122 | inode, (struct nilfs_inode *)(bh->b_data + n), 1); | ||
123 | } | ||
124 | |||
125 | #endif /* _NILFS_MDT_H */ | 108 | #endif /* _NILFS_MDT_H */ |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 6eff66a070d5..d21179bd5a41 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -974,12 +974,12 @@ static void nilfs_segctor_fill_in_super_root(struct nilfs_sc_info *sci, | |||
974 | nilfs->ns_nongc_ctime : sci->sc_seg_ctime); | 974 | nilfs->ns_nongc_ctime : sci->sc_seg_ctime); |
975 | raw_sr->sr_flags = 0; | 975 | raw_sr->sr_flags = 0; |
976 | 976 | ||
977 | nilfs_mdt_write_inode_direct( | 977 | nilfs_write_inode_common(nilfs_dat_inode(nilfs), (void *)raw_sr + |
978 | nilfs_dat_inode(nilfs), bh_sr, NILFS_SR_DAT_OFFSET(isz)); | 978 | NILFS_SR_DAT_OFFSET(isz), 1); |
979 | nilfs_mdt_write_inode_direct( | 979 | nilfs_write_inode_common(nilfs->ns_cpfile, (void *)raw_sr + |
980 | nilfs->ns_cpfile, bh_sr, NILFS_SR_CPFILE_OFFSET(isz)); | 980 | NILFS_SR_CPFILE_OFFSET(isz), 1); |
981 | nilfs_mdt_write_inode_direct( | 981 | nilfs_write_inode_common(nilfs->ns_sufile, (void *)raw_sr + |
982 | nilfs->ns_sufile, bh_sr, NILFS_SR_SUFILE_OFFSET(isz)); | 982 | NILFS_SR_SUFILE_OFFSET(isz), 1); |
983 | } | 983 | } |
984 | 984 | ||
985 | static void nilfs_redirty_inodes(struct list_head *head) | 985 | static void nilfs_redirty_inodes(struct list_head *head) |