summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/stack_user.c
diff options
context:
space:
mode:
authorDavid Teigland2008-11-10 23:24:57 +0100
committerMark Fasheh2008-12-01 23:46:39 +0100
commit66f502a416f18cd36179290746aa53736c6b2828 (patch)
tree30b538d2310b49cbcda079f6010c5850d6a146c0 /fs/ocfs2/stack_user.c
parentocfs2: comments typo fix (diff)
downloadkernel-qcow2-linux-66f502a416f18cd36179290746aa53736c6b2828.tar.gz
kernel-qcow2-linux-66f502a416f18cd36179290746aa53736c6b2828.tar.xz
kernel-qcow2-linux-66f502a416f18cd36179290746aa53736c6b2828.zip
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 <teigland@redhat.com> Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/stack_user.c')
-rw-r--r--fs/ocfs2/stack_user.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index faec2d879357..9b76d41a8ac6 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);
}