ocfs2/dlm: unlock lockres spinlock before dlm_lockres_put
authorJoseph Qi <joseph.qi@huawei.com>
Thu, 22 Oct 2015 20:32:29 +0000 (13:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Oct 2015 08:55:10 +0000 (17:55 +0900)
commitb67de018b37a97548645a879c627d4188518e907
tree79593d33b91fa8188454d61af8634dbfe35230b3
parentbb387002693ed28b2bb0408c5dec65521b71e5f1
ocfs2/dlm: unlock lockres spinlock before dlm_lockres_put

dlm_lockres_put will call dlm_lockres_release if it is the last
reference, and then it may call dlm_print_one_lock_resource and
take lockres spinlock.

So unlock lockres spinlock before dlm_lockres_put to avoid deadlock.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/dlm/dlmrecovery.c