Skip to contentSkip to conversation

ocfs2/dlm: Fix printing of lockname

PATCH New Sunil Mushran 3 participants 3 messages Feb 6, 2010 – Feb 8, 2010 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2/dlm: Fix printing of lockname

The debug call printing the name of the lock resource was chopping off the last character. This patch fixes the problem.

---
 fs/ocfs2/dlm/dlmdebug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ocfs2/dlm/dlmdebug.c +1 -1
index f18afe9..75efd45 100644
@@ -102,7 +102,7 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
 	assert_spin_locked(&res->spinlock);
 
 	stringify_lockname(res->lockname.name, res->lockname.len,
-			   buf, sizeof(buf) - 1);
+			   buf, sizeof(buf));
 	printk("lockres: %s, owner=%u, state=%u\n",
 	       buf, res->owner, res->state);
 	printk("  last used: %lu, refcnt: %u, on purge list: %s\n",
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 1/1 ocfs2/dlm: Fix printing of lockname

In reply to Sunil Mushran
Quoted 4 lines · Sunil Mushran

The debug call printing the name of the lock resource was chopping off the last character. This patch fixes the problem.

This patch is now in the 'fixes' branch of ocfs2.git.

Joel

Signature · 9 lines
Life's Little Instruction Book #314

	"Never underestimate the power of forgiveness."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127