diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-07-27 00:11:19 +0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-07-27 20:46:46 +0400 |
commit | 85d4e461117b40eb10722f774566b19bd5e77879 (patch) | |
tree | 56b7c66d03a72008e0db0bf4f58edbee5170fee1 /fs/btrfs/disk-io.h | |
parent | bd681513fa6f2ff29aa391f01e413a2d1c59fd77 (diff) | |
download | linux-85d4e461117b40eb10722f774566b19bd5e77879.tar.xz |
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/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index a0b610a67aae..bec3ea4bd67f 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -87,10 +87,14 @@ int btree_lock_page_hook(struct page *page); #ifdef CONFIG_DEBUG_LOCK_ALLOC -void btrfs_set_buffer_lockdep_class(struct extent_buffer *eb, int level); +void btrfs_init_lockdep(void); +void btrfs_set_buffer_lockdep_class(u64 objectid, + struct extent_buffer *eb, int level); #else -static inline void btrfs_set_buffer_lockdep_class(struct extent_buffer *eb, - int level) +static inline void btrfs_init_lockdep(void) +{ } +static inline void btrfs_set_buffer_lockdep_class(u64 objectid, + struct extent_buffer *eb, int level) { } #endif |