ocfs2: Use dlm_print_one_lock_resource for lock resource print
authorTao Ma <tao.ma@oracle.com>
Thu, 28 Feb 2008 02:41:55 +0000 (10:41 +0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Mon, 10 Mar 2008 22:13:50 +0000 (15:13 -0700)
__dlm_print_one_lock_resource must be called with spin_lock
the res->spinlock. While in some cases, we use it without this
precondition and lead to the failure of assert_spin_locked.
So call dlm_print_one_lock_resource instead.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/dlm/dlmconvert.c
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/dlm/dlmrecovery.c

index ecb4d997221e6460b33efa9e2747bda6b78fa3bb..75997b4deaf3ff9fafd4fcf25293c9312fb17fc8 100644 (file)
@@ -487,7 +487,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data,
                               "cookie=%u:%llu\n",
                     dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)),
                     dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie)));
-               __dlm_print_one_lock_resource(res);
+               dlm_print_one_lock_resource(res);
                goto leave;
        }
 
index c92d1b19fc0bbb51c0c98cbe27847f98ac6fce10..6d318b0bd81619d20355f38b928ce8f0806b7c18 100644 (file)
@@ -2348,7 +2348,7 @@ int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
                        mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref "
                        "but it is already dropped!\n", dlm->name,
                        res->lockname.len, res->lockname.name, node);
-                       __dlm_print_one_lock_resource(res);
+                       dlm_print_one_lock_resource(res);
                }
                ret = 0;
                goto done;
@@ -2408,7 +2408,7 @@ static void dlm_deref_lockres_worker(struct dlm_work_item *item, void *data)
                mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref "
                     "but it is already dropped!\n", dlm->name,
                     res->lockname.len, res->lockname.name, node);
-               __dlm_print_one_lock_resource(res);
+               dlm_print_one_lock_resource(res);
        }
 
        dlm_lockres_put(res);
index 91f747b8a538b0eb4217f176140064189594211d..550d4e62b3204faf7049dad750de3f23da78e95b 100644 (file)
@@ -1191,7 +1191,7 @@ static int dlm_add_lock_to_array(struct dlm_lock *lock,
                            (ml->type == LKM_EXMODE ||
                             memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) {
                                mlog(ML_ERROR, "mismatched lvbs!\n");
-                               __dlm_print_one_lock_resource(lock->lockres);
+                               dlm_print_one_lock_resource(lock->lockres);
                                BUG();
                        }
                        memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN);