diff --git a/[refs] b/[refs] index 86b23b9e7dc1..ad515b9b2784 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 51fab693477c39ba82c153d3fb30a4cc6de49874 +refs/heads/master: 39f9d028c9906cc7b625df84442205f6bcc84477 diff --git a/trunk/fs/btrfs/locking.c b/trunk/fs/btrfs/locking.c index 2a1762c66041..e95df435d897 100644 --- a/trunk/fs/btrfs/locking.c +++ b/trunk/fs/btrfs/locking.c @@ -113,11 +113,10 @@ void btrfs_tree_read_lock(struct extent_buffer *eb) read_unlock(&eb->lock); return; } - read_unlock(&eb->lock); - wait_event(eb->write_lock_wq, atomic_read(&eb->blocking_writers) == 0); - read_lock(&eb->lock); if (atomic_read(&eb->blocking_writers)) { read_unlock(&eb->lock); + wait_event(eb->write_lock_wq, + atomic_read(&eb->blocking_writers) == 0); goto again; } atomic_inc(&eb->read_locks);