Btrfs: fix worker lock misuse in find_worker
authorChris Mason <chris.mason@oracle.com>
Fri, 23 Dec 2011 12:53:00 +0000 (07:53 -0500)
committerChris Mason <chris.mason@oracle.com>
Fri, 23 Dec 2011 12:53:00 +0000 (07:53 -0500)
Dan Carpenter noticed that we were doing a double unlock on the worker
lock, and sometimes picking a worker thread without the lock held.

This fixes both errors.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

No differences found