From dc935be2a094087bc561d80f8cf9e66bbc1f7b18 Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Sat, 10 Jul 2010 22:21:54 +0900 Subject: nilfs2: unify bmap set_target_v operations This unifies two similar functions nilfs_btree_set_target_v and nilfs_direct_set_target_v into one, nilfs_bmap_set_target_v. Signed-off-by: Ryusuke Konishi --- fs/nilfs2/btree.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'fs/nilfs2/btree.c') diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 81e871645b5f..0543bf9f80ba 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -917,13 +917,6 @@ static __u64 nilfs_btree_find_target_v(const struct nilfs_bmap *btree, return nilfs_bmap_find_target_in_group(btree); } -static void nilfs_btree_set_target_v(struct nilfs_bmap *btree, __u64 key, - __u64 ptr) -{ - btree->b_last_allocated_key = key; - btree->b_last_allocated_ptr = ptr; -} - static int nilfs_btree_prepare_insert(struct nilfs_bmap *btree, struct nilfs_btree_path *path, int *levelp, __u64 key, __u64 ptr, @@ -1084,7 +1077,7 @@ static void nilfs_btree_commit_insert(struct nilfs_bmap *btree, set_buffer_nilfs_volatile((struct buffer_head *)((unsigned long)ptr)); ptr = path[NILFS_BTREE_LEVEL_DATA].bp_newreq.bpr_ptr; if (NILFS_BMAP_USE_VBN(btree)) { - nilfs_btree_set_target_v(btree, key, ptr); + nilfs_bmap_set_target_v(btree, key, ptr); dat = nilfs_bmap_get_dat(btree); } @@ -1662,7 +1655,7 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *btree, } if (NILFS_BMAP_USE_VBN(btree)) - nilfs_btree_set_target_v(btree, key, dreq->bpr_ptr); + nilfs_bmap_set_target_v(btree, key, dreq->bpr_ptr); } /** -- cgit v1.2.3