summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason2011-07-26 22:11:19 +0200
committerChris Mason2011-07-27 18:46:46 +0200
commit85d4e461117b40eb10722f774566b19bd5e77879 (patch)
tree56b7c66d03a72008e0db0bf4f58edbee5170fee1 /fs/btrfs/volumes.c
parentBtrfs: switch the btrfs tree locks to reader/writer (diff)
downloadkernel-qcow2-linux-85d4e461117b40eb10722f774566b19bd5e77879.tar.gz
kernel-qcow2-linux-85d4e461117b40eb10722f774566b19bd5e77879.tar.xz
kernel-qcow2-linux-85d4e461117b40eb10722f774566b19bd5e77879.zip
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/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 19450bc53632..b89e372c7544 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3595,7 +3595,7 @@ int btrfs_read_sys_array(struct btrfs_root *root)
if (!sb)
return -ENOMEM;
btrfs_set_buffer_uptodate(sb);
- btrfs_set_buffer_lockdep_class(sb, 0);
+ btrfs_set_buffer_lockdep_class(root->root_key.objectid, sb, 0);
write_extent_buffer(sb, super_copy, 0, BTRFS_SUPER_INFO_SIZE);
array_size = btrfs_super_sys_array_size(super_copy);