1 From: David Teigland <teigland@redhat.com>
2 Date: Mon, 10 Nov 2008 16:24:57 -0600
3 Subject: ocfs2: initialize stack_user lvbptr
5 The locking_state dump, ocfs2_dlm_seq_show, reads the lvb on locks where it
6 has not yet been initialized by a lock call.
8 Signed-off-by: David Teigland <teigland@redhat.com>
9 Acked-by: Joel Becker <joel.becker@oracle.com>
10 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12 fs/ocfs2/stack_user.c | 3 +++
13 1 files changed, 3 insertions(+), 0 deletions(-)
15 Index: linux-2.6.27-ocfs2/fs/ocfs2/stack_user.c
16 ===================================================================
17 --- linux-2.6.27-ocfs2.orig/fs/ocfs2/stack_user.c
18 +++ linux-2.6.27-ocfs2/fs/ocfs2/stack_user.c
19 @@ -740,6 +740,9 @@ static int user_dlm_lock_status(union oc
21 static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
23 + if (!lksb->lksb_fsdlm.sb_lvbptr)
24 + lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb +
25 + sizeof(struct dlm_lksb);
26 return (void *)(lksb->lksb_fsdlm.sb_lvbptr);