diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-28 13:57:48 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-28 13:57:48 -0400 |
commit | d98237b3ede7ab98892f7fa62201a13694c526e2 (patch) | |
tree | cdf99f2d1e9bc088027cd98e5ed0e4efc79698e3 /fs/btrfs/extent-tree.c | |
parent | 5f443fd280c76a2170259cebaa4108c9daad6e1b (diff) |
Btrfs: use a btree inode instead of sb_getblk
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 176c6dc534ba..b2ae8e768b6c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -172,8 +172,8 @@ static int pin_down_block(struct btrfs_root *root, u64 blocknr, int pending) | |||
172 | struct buffer_head *bh; | 172 | struct buffer_head *bh; |
173 | 173 | ||
174 | if (!pending) { | 174 | if (!pending) { |
175 | bh = sb_find_get_block(root->fs_info->sb, blocknr); | 175 | bh = btrfs_find_tree_block(root, blocknr); |
176 | if (bh) { | 176 | if (bh && buffer_uptodate(bh)) { |
177 | header = btrfs_buffer_header(bh); | 177 | header = btrfs_buffer_header(bh); |
178 | if (btrfs_header_generation(header) == | 178 | if (btrfs_header_generation(header) == |
179 | root->fs_info->running_transaction->transid) { | 179 | root->fs_info->running_transaction->transid) { |
@@ -291,12 +291,10 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root | |||
291 | *root, u64 blocknr, u64 num_blocks, int pin) | 291 | *root, u64 blocknr, u64 num_blocks, int pin) |
292 | { | 292 | { |
293 | struct btrfs_root *extent_root = root->fs_info->extent_root; | 293 | struct btrfs_root *extent_root = root->fs_info->extent_root; |
294 | struct buffer_head *t; | ||
295 | int pending_ret; | 294 | int pending_ret; |
296 | int ret; | 295 | int ret; |
297 | 296 | ||
298 | if (root == extent_root) { | 297 | if (root == extent_root) { |
299 | t = find_tree_block(root, blocknr); | ||
300 | pin_down_block(root, blocknr, 1); | 298 | pin_down_block(root, blocknr, 1); |
301 | return 0; | 299 | return 0; |
302 | } | 300 | } |
@@ -482,7 +480,7 @@ struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | |||
482 | BUG(); | 480 | BUG(); |
483 | return NULL; | 481 | return NULL; |
484 | } | 482 | } |
485 | buf = find_tree_block(root, ins.objectid); | 483 | buf = btrfs_find_create_tree_block(root, ins.objectid); |
486 | set_buffer_uptodate(buf); | 484 | set_buffer_uptodate(buf); |
487 | return buf; | 485 | return buf; |
488 | } | 486 | } |