ocfs2/dlm: fix a dead lock
authorWengang Wang <wen.gang.wang@oracle.com>
Fri, 16 Jul 2010 15:13:33 +0000 (23:13 +0800)
committerJoel Becker <joel.becker@oracle.com>
Sat, 7 Aug 2010 17:44:20 +0000 (10:44 -0700)
When we have to take both dlm->master_lock and lockres->spinlock,
take them in order

lockres->spinlock and then dlm->master_lock.

The patch fixes a violation of the rule.
We can simply move taking dlm->master_lock to where we have dropped res->spinlock
since when we access res->state and free mle memory we don't need master_lock's
protection.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Joel Becker <joel.becker@oracle.com>

No differences found