summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-07-22 11:18:08 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commita61e6f29dc7c9d56a776a518eed92bbc61848263 (patch)
tree6856ad3e5822eacfc2ac94693b6023ef81567fd2 /fs/btrfs/extent-tree.c
parent6af118ce51b52ceda357c671550c79628b9c4a65 (diff)
downloadop-kernel-dev-a61e6f29dc7c9d56a776a518eed92bbc61848263.zip
op-kernel-dev-a61e6f29dc7c9d56a776a518eed92bbc61848263.tar.gz
Btrfs: Use a mutex in the extent buffer for tree block locking
This replaces the use of the page cache lock bit for locking, which wasn't suitable for block size < page size and couldn't be used recursively. The mutexes alone don't fix either problem, but they are the first step. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index ccd4932..c51cd11 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1451,7 +1451,7 @@ static int pin_down_bytes(struct btrfs_root *root, u64 bytenr, u32 num_bytes,
struct extent_buffer *buf;
buf = btrfs_find_tree_block(root, bytenr, num_bytes);
if (buf) {
- if (!btrfs_try_tree_lock(buf) &&
+ if (btrfs_try_tree_lock(buf) &&
btrfs_buffer_uptodate(buf, 0)) {
u64 transid =
root->fs_info->running_transaction->transid;
@@ -3345,11 +3345,6 @@ int btrfs_read_block_groups(struct btrfs_root *root)
set_state_private(block_group_cache, found_key.objectid,
(unsigned long)cache);
- /* hack for now */
- if (cache->flags & BTRFS_BLOCK_GROUP_METADATA) {
- cache_block_group(root->fs_info->extent_root,
- cache);
- }
if (key.objectid >=
btrfs_super_total_bytes(&info->super_copy))
break;
OpenPOWER on IntegriCloud