ocfs2: initialize stack_user lvbptr
authorDavid Teigland <teigland@redhat.com>
Mon, 10 Nov 2008 22:24:57 +0000 (16:24 -0600)
committerMark Fasheh <mfasheh@suse.com>
Mon, 1 Dec 2008 22:46:39 +0000 (14:46 -0800)
The locking_state dump, ocfs2_dlm_seq_show, reads the lvb on locks where it
has not yet been initialized by a lock call.

Signed-off-by: David Teigland <teigland@redhat.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/stack_user.c

index faec2d8..9b76d41 100644 (file)
@@ -740,6 +740,9 @@ static int user_dlm_lock_status(union ocfs2_dlm_lksb *lksb)
 
 static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
 {
+       if (!lksb->lksb_fsdlm.sb_lvbptr)
+               lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb +
+                                            sizeof(struct dlm_lksb);
        return (void *)(lksb->lksb_fsdlm.sb_lvbptr);
 }