aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authoralex chen <alex.chen@huawei.com>2014-10-09 18:25:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:25:47 -0400
commit9a7e6b5a0ad1a554ca982c555a34ce8086d5b994 (patch)
tree20f774e8024fd220b8feb59d60da32b0583168df /fs/ocfs2
parent4a4e07c1bdbbc24d905e4c266b92cada9371db5d (diff)
ocfs2/dlm: call dlm_lockres_put without resource spinlock
dlm_lockres_put() should be called without &res->spinlock, otherwise a deadlock case may happen. spin_lock(&res->spinlock) ... dlm_lockres_put ->dlm_lockres_release ->dlm_print_one_lock_resource ->spin_lock(&res->spinlock) Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 45067faf5695..3365839d2971 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1710,9 +1710,12 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data,
1710 BUG(); 1710 BUG();
1711 } else 1711 } else
1712 __dlm_lockres_grab_inflight_worker(dlm, res); 1712 __dlm_lockres_grab_inflight_worker(dlm, res);
1713 } else /* put.. incase we are not the master */ 1713 spin_unlock(&res->spinlock);
1714 } else {
1715 /* put.. incase we are not the master */
1716 spin_unlock(&res->spinlock);
1714 dlm_lockres_put(res); 1717 dlm_lockres_put(res);
1715 spin_unlock(&res->spinlock); 1718 }
1716 } 1719 }
1717 spin_unlock(&dlm->spinlock); 1720 spin_unlock(&dlm->spinlock);
1718 1721