[Ocfs2-commits] khackel commits r2697 - branches/ocfs2-1.2/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Nov 10 14:18:26 CST 2005


Author: khackel
Signed-off-by: mfasheh
Date: 2005-11-10 14:18:23 -0600 (Thu, 10 Nov 2005)
New Revision: 2697

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c
Log:
* Merge revision 2696 from trunk
	- Fixes bug 517: Hang during unmount

Signed-off-by: mfasheh



Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c	2005-11-10 19:56:57 UTC (rev 2696)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmast.c	2005-11-10 20:18:23 UTC (rev 2697)
@@ -114,9 +114,22 @@
 
 	/* check to see if this ast obsoletes the bast */
 	if (dlm_should_cancel_bast(dlm, lock)) {
+		struct dlm_lock_resource *res = lock->lockres;
+		mlog(0, "%s: cancelling bast for %.*s\n",
+		     dlm->name, res->lockname.len, res->lockname.name);
 		lock->bast_pending = 0;
 		list_del_init(&lock->bast_list);
 		lock->ml.highest_blocked = LKM_IVMODE;
+		/* removing lock from list, remove a ref.  guaranteed
+		 * this won't be the last ref because of the get above,
+		 * so res->spinlock will not be taken here */
+		dlm_lock_put(lock);
+		/* free up the reserved bast that we are cancelling.
+		 * guaranteed that this will not be the last reserved
+		 * ast because *both* an ast and a bast were reserved 
+		 * to get to this point.  the res->spinlock will not be
+		 * taken here */
+		dlm_lockres_release_ast(dlm, res);
 	}
 	list_add_tail(&lock->ast_list, &dlm->pending_asts);
 	lock->ast_pending = 1;



More information about the Ocfs2-commits mailing list