aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/bmap.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-05-21 12:07:13 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-06-10 10:41:10 -0400
commitf198dbb9cf580c09644ebdf46846115c6daff14e (patch)
tree0792f2044153e35bea1c2b93d69ba8045cd86551 /fs/nilfs2/bmap.c
parent9f098900ad34edfe3bcc2498cfa372f588b96c62 (diff)
nilfs2: move get block functions in bmap.c into btree codes
Two get block function for btree nodes, nilfs_bmap_get_block() and nilfs_bmap_get_new_block(), are called only from the btree codes. This relocation will increase opportunities of compiler optimization. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/bmap.c')
-rw-r--r--fs/nilfs2/bmap.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c
index d7dbedfbd2b4..cf5c5d2cfa00 100644
--- a/fs/nilfs2/bmap.c
+++ b/fs/nilfs2/bmap.c
@@ -417,26 +417,6 @@ void nilfs_bmap_sub_blocks(const struct nilfs_bmap *bmap, int n)
417 mark_inode_dirty(bmap->b_inode); 417 mark_inode_dirty(bmap->b_inode);
418} 418}
419 419
420int nilfs_bmap_get_block(const struct nilfs_bmap *bmap, __u64 ptr,
421 struct buffer_head **bhp)
422{
423 return nilfs_btnode_get(&NILFS_BMAP_I(bmap)->i_btnode_cache,
424 ptr, 0, bhp, 0);
425}
426
427int nilfs_bmap_get_new_block(const struct nilfs_bmap *bmap, __u64 ptr,
428 struct buffer_head **bhp)
429{
430 int ret;
431
432 ret = nilfs_btnode_get(&NILFS_BMAP_I(bmap)->i_btnode_cache,
433 ptr, 0, bhp, 1);
434 if (ret < 0)
435 return ret;
436 set_buffer_nilfs_volatile(*bhp);
437 return 0;
438}
439
440__u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap, 420__u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap,
441 const struct buffer_head *bh) 421 const struct buffer_head *bh)
442{ 422{