Btrfs: call the ordered free operation without any locks held
authorChris Mason <chris.mason@fusionio.com>
Wed, 25 Jul 2012 19:57:13 +0000 (15:57 -0400)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Oct 2012 21:38:06 +0000 (23:38 +0200)
commit7665fb0c4f0b08543a7c4c064a76d314d43a9863
treedb5ecce946646af5b1e975ad3a6154d42b821e91
parentd4e89205393edf4296d2345143b73ebfe17a7531
Btrfs: call the ordered free operation without any locks held

commit e9fbcb42201c862fd6ab45c48ead4f47bb2dea9d upstream.

Each ordered operation has a free callback, and this was called with the
worker spinlock held.  Josef made the free callback also call iput,
which we can't do with the spinlock.

This drops the spinlock for the free operation and grabs it again before
moving through the rest of the list.  We'll circle back around to this
and find a cleaner way that doesn't bounce the lock around so much.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/btrfs/async-thread.c