Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dabc47de authored by Sunil Mushran's avatar Sunil Mushran Committed by Mark Fasheh
Browse files

ocfs2/dlm: Use ast_lock to protect ast_list



The code was using dlm->spinlock instead of dlm->ast_lock to protect the
ast_list. This patch fixes the issue.

Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
Acked-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent c74ff8bb
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -117,11 +117,11 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm,
	else
	else
		BUG_ON(res->owner == dlm->node_num);
		BUG_ON(res->owner == dlm->node_num);


	spin_lock(&dlm->spinlock);
	spin_lock(&dlm->ast_lock);
	/* We want to be sure that we're not freeing a lock
	/* We want to be sure that we're not freeing a lock
	 * that still has AST's pending... */
	 * that still has AST's pending... */
	in_use = !list_empty(&lock->ast_list);
	in_use = !list_empty(&lock->ast_list);
	spin_unlock(&dlm->spinlock);
	spin_unlock(&dlm->ast_lock);
	if (in_use) {
	if (in_use) {
	       mlog(ML_ERROR, "lockres %.*s: Someone is calling dlmunlock "
	       mlog(ML_ERROR, "lockres %.*s: Someone is calling dlmunlock "
		    "while waiting for an ast!", res->lockname.len,
		    "while waiting for an ast!", res->lockname.len,