Skip to content

Commit

Permalink
nilfs2: remove nilfs_bmap_delete_block
Browse files Browse the repository at this point in the history
nilfs_bmap_delete_block() is a wrapper function calling
nilfs_btnode_delete().  This removes it for simplicity.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
Ryusuke Konishi committed Jun 10, 2009
1 parent 087d01b commit 9f09890
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 0 additions & 6 deletions fs/nilfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,6 @@ int nilfs_bmap_get_new_block(const struct nilfs_bmap *bmap, __u64 ptr,
return 0;
}

void nilfs_bmap_delete_block(const struct nilfs_bmap *bmap,
struct buffer_head *bh)
{
nilfs_btnode_delete(bh);
}

__u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap,
const struct buffer_head *bh)
{
Expand Down
1 change: 0 additions & 1 deletion fs/nilfs2/bmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ int nilfs_bmap_get_block(const struct nilfs_bmap *, __u64,
struct buffer_head **);
int nilfs_bmap_get_new_block(const struct nilfs_bmap *, __u64,
struct buffer_head **);
void nilfs_bmap_delete_block(const struct nilfs_bmap *, struct buffer_head *);


/* Assume that bmap semaphore is locked. */
Expand Down
8 changes: 4 additions & 4 deletions fs/nilfs2/btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ static int nilfs_btree_prepare_insert(struct nilfs_btree *btree,
&path[level].bp_newreq);
err_out_child_node:
for (level--; level > NILFS_BTREE_LEVEL_DATA; level--) {
nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_sib_bh);
nilfs_btnode_delete(path[level].bp_sib_bh);
btree->bt_bmap.b_pops->bpop_abort_alloc_ptr(
&btree->bt_bmap, &path[level].bp_newreq);

Expand Down Expand Up @@ -1220,7 +1220,7 @@ static void nilfs_btree_concat_left(struct nilfs_btree *btree,
unlock_buffer(path[level].bp_bh);
unlock_buffer(path[level].bp_sib_bh);

nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_bh);
nilfs_btnode_delete(path[level].bp_bh);
path[level].bp_bh = path[level].bp_sib_bh;
path[level].bp_sib_bh = NULL;
path[level].bp_index += nilfs_btree_node_get_nchildren(btree, left);
Expand Down Expand Up @@ -1251,7 +1251,7 @@ static void nilfs_btree_concat_right(struct nilfs_btree *btree,
unlock_buffer(path[level].bp_bh);
unlock_buffer(path[level].bp_sib_bh);

nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_sib_bh);
nilfs_btnode_delete(path[level].bp_sib_bh);
path[level].bp_sib_bh = NULL;
path[level + 1].bp_index++;
}
Expand All @@ -1275,7 +1275,7 @@ static void nilfs_btree_shrink(struct nilfs_btree *btree,
nilfs_btree_node_move_left(btree, root, child, n);
unlock_buffer(path[level].bp_bh);

nilfs_bmap_delete_block(&btree->bt_bmap, path[level].bp_bh);
nilfs_btnode_delete(path[level].bp_bh);
path[level].bp_bh = NULL;
}

Expand Down

0 comments on commit 9f09890

Please sign in to comment.