diff options
author | Arne Jansen <sensille@gmx.net> | 2011-09-13 12:55:48 +0400 |
---|---|---|
committer | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2012-01-04 19:12:29 +0400 |
commit | 5b25f70f4200766355cdabda604e131d2fb6010d (patch) | |
tree | 20749d5e90763e8c1746d36b00c5beec5e3660b9 /fs/btrfs/extent_io.c | |
parent | eebe063b7f916087cd5c61de57b20a3a30894a96 (diff) | |
download | linux-5b25f70f4200766355cdabda604e131d2fb6010d.tar.xz |
Btrfs: add nested locking mode for paths
This patch adds the possibilty to read-lock an extent even if it is already
write-locked from the same thread. btrfs_find_all_roots() needs this
capability.
Signed-off-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index be1bf627a14b..dd8d140eb27b 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3571,6 +3571,7 @@ static struct extent_buffer *__alloc_extent_buffer(struct extent_io_tree *tree, atomic_set(&eb->blocking_writers, 0); atomic_set(&eb->spinning_readers, 0); atomic_set(&eb->spinning_writers, 0); + eb->lock_nested = 0; init_waitqueue_head(&eb->write_lock_wq); init_waitqueue_head(&eb->read_lock_wq); |