[Ocfs2-commits] khackel commits r2751 - branches/ocfs2-1.2/fs/ocfs2/dlm
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Wed Jan 18 19:04:18 CST 2006
Author: khackel
Signed-off-by: khackel
Signed-off-by: mfasheh
Date: 2006-01-18 19:04:13 -0600 (Wed, 18 Jan 2006)
New Revision: 2751
Modified:
branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
Log:
* fix a bug in dlm_convert_lock_handler where dlm_lockres_release_ast was being
called even if no ast was ever reserved
Signed-off-by: khackel
Signed-off-by: mfasheh
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c 2006-01-19 01:02:27 UTC (rev 2750)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c 2006-01-19 01:04:13 UTC (rev 2751)
@@ -421,7 +421,7 @@
struct dlm_lockstatus *lksb;
enum dlm_status status = DLM_NORMAL;
u32 flags;
- int call_ast = 0, kick_thread = 0;
+ int call_ast = 0, kick_thread = 0, ast_reserved = 0;
if (!dlm_grab(dlm)) {
dlm_error(DLM_REJECTED);
@@ -490,6 +490,7 @@
status = __dlm_lockres_state_to_status(res);
if (status == DLM_NORMAL) {
__dlm_lockres_reserve_ast(res);
+ ast_reserved = 1;
res->state |= DLM_LOCK_RES_IN_PROGRESS;
status = __dlmconvert_master(dlm, res, lock, flags,
cnv->requested_type,
@@ -512,10 +513,10 @@
else
dlm_lock_put(lock);
- /* either queue the ast or release it */
+ /* either queue the ast or release it, if reserved */
if (call_ast)
dlm_queue_ast(dlm, lock);
- else
+ else if (ast_reserved)
dlm_lockres_release_ast(dlm, res);
if (kick_thread)
More information about the Ocfs2-commits
mailing list