aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-07-26 16:11:19 -0400
committerChris Mason <chris.mason@oracle.com>2011-07-27 12:46:46 -0400
commit85d4e461117b40eb10722f774566b19bd5e77879 (patch)
tree56b7c66d03a72008e0db0bf4f58edbee5170fee1 /fs/btrfs/extent-tree.c
parentbd681513fa6f2ff29aa391f01e413a2d1c59fd77 (diff)
Btrfs: make a lockdep class for each root
This patch was originally from Tejun Heo. lockdep complains about the btrfs locking because we sometimes take btree locks from two different trees at the same time. The current classes are based only on level in the btree, which isn't enough information for lockdep to figure out if the lock is safe. This patch makes a class for each type of tree, and lumps all the FS trees that actually have files and directories into the same class. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 2a782c2fcb62..06a5ee29b446 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5625,7 +5625,7 @@ struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
5625 if (!buf) 5625 if (!buf)
5626 return ERR_PTR(-ENOMEM); 5626 return ERR_PTR(-ENOMEM);
5627 btrfs_set_header_generation(buf, trans->transid); 5627 btrfs_set_header_generation(buf, trans->transid);
5628 btrfs_set_buffer_lockdep_class(buf, level); 5628 btrfs_set_buffer_lockdep_class(root->root_key.objectid, buf, level);
5629 btrfs_tree_lock(buf); 5629 btrfs_tree_lock(buf);
5630 clean_tree_block(trans, root, buf); 5630 clean_tree_block(trans, root, buf);
5631 5631