ocfs2/dlm: Fix printing of lockname
authorSunil Mushran <sunil.mushran@oracle.com>
Sat, 6 Feb 2010 01:55:56 +0000 (17:55 -0800)
committerJoel Becker <joel.becker@oracle.com>
Mon, 8 Feb 2010 21:01:31 +0000 (13:01 -0800)
The debug call printing the name of the lock resource was chopping
off the last character. This patch fixes the problem.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/dlm/dlmdebug.c

index 42b0bad..0cd24cf 100644 (file)
@@ -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",