aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmunlock.c
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2007-01-17 18:11:36 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2007-02-07 15:06:24 -0500
commit74aa25856c693d20a886cdb31a004aaca411d135 (patch)
treeea833f164771279a3141668e537e316c21027387 /fs/ocfs2/dlm/dlmunlock.c
parent90aaaf1c235a70daee04e897e9501415b766de69 (diff)
ocfs2_dlm: Cookies in locks not being printed correctly in error messages
The dlm encodes the node number and a sequence number in the lock cookie. It also stores the cookie in the lockres in the big endian format to avoid swapping 8 bytes on each lock request. The bug here was that it was assuming the cookie to be in the cpu format when decoding it for printing the error message. This patch swaps the bytes before the print. Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmunlock.c')
-rw-r--r--fs/ocfs2/dlm/dlmunlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c
index 3c8a250fcfec..fc8baa3e9539 100644
--- a/fs/ocfs2/dlm/dlmunlock.c
+++ b/fs/ocfs2/dlm/dlmunlock.c
@@ -248,8 +248,8 @@ leave:
248 /* this should always be coupled with list removal */ 248 /* this should always be coupled with list removal */
249 BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK)); 249 BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK));
250 mlog(0, "lock %u:%llu should be gone now! refs=%d\n", 250 mlog(0, "lock %u:%llu should be gone now! refs=%d\n",
251 dlm_get_lock_cookie_node(lock->ml.cookie), 251 dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)),
252 dlm_get_lock_cookie_seq(lock->ml.cookie), 252 dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)),
253 atomic_read(&lock->lock_refs.refcount)-1); 253 atomic_read(&lock->lock_refs.refcount)-1);
254 dlm_lock_put(lock); 254 dlm_lock_put(lock);
255 } 255 }
@@ -506,8 +506,8 @@ not_found:
506 if (!found) 506 if (!found)
507 mlog(ML_ERROR, "failed to find lock to unlock! " 507 mlog(ML_ERROR, "failed to find lock to unlock! "
508 "cookie=%u:%llu\n", 508 "cookie=%u:%llu\n",
509 dlm_get_lock_cookie_node(unlock->cookie), 509 dlm_get_lock_cookie_node(be64_to_cpu(unlock->cookie)),
510 dlm_get_lock_cookie_seq(unlock->cookie)); 510 dlm_get_lock_cookie_seq(be64_to_cpu(unlock->cookie)));
511 else 511 else
512 dlm_lock_put(lock); 512 dlm_lock_put(lock);
513 513