From: David Teigland Date: Mon, 10 Nov 2008 22:24:57 +0000 (-0600) Subject: ocfs2: initialize stack_user lvbptr X-Git-Tag: v2.6.28-rc7~25^2~4 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=66f502a416f18cd36179290746aa53736c6b2828 ocfs2: initialize stack_user lvbptr 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 Acked-by: Joel Becker Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index faec2d87935..9b76d41a8ac 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c @@ -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); }