Btrfs: remove ourselves from the cluster list under lock
authorJosef Bacik <jbacik@fusionio.com>
Thu, 22 Aug 2013 21:03:29 +0000 (17:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2013 23:08:34 +0000 (16:08 -0700)
commit322d9a97c490b890975e0d61f2b034bc18ea1100
treee7fcb8dced28d6522a1e9b52d97e16294e6a2f4e
parent0ac5762ca876c8554cea6e8a05422d561b98947f
Btrfs: remove ourselves from the cluster list under lock

commit b8d0c69b9469ffd33df30fee3e990f2d4aa68a09 upstream.

A user was reporting weird warnings from btrfs_put_delayed_ref() and I noticed
that we were doing this list_del_init() on our head ref outside of
delayed_refs->lock.  This is a problem if we have people still on the list, we
could end up modifying old pointers and such.  Fix this by removing us from the
list before we do our run_delayed_ref on our head ref.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent-tree.c