Skip to contentSkip to conversation

ocfs2: initialize stack_user lvbptr

Ocfs2-devel Joel Becker 2 participants 2 messages Nov 10, 2008 1 message not in the archive OCFS2

lore
Share & tools
lore

Joel Becker

author Acked-by
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · David Teigland

commit 3d48397962cdad2aa32df75cfdae980af9bce8cc

Author: David Teigland <[email protected]>
Date:   Mon Nov 10 16:16:07 2008 -0600

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.

Quoted 15 lines
fs/ocfs2/stack_user.c +3 -0
index faec2d8..9b76d41 100644
@@ -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);
 }
 
Signature · 10 lines
"What does it say about a society's priorities when the time you
 spend in meetings on Monday is greater than the total number of
 hours you spent sleeping over the weekend?"
	- Nat Friedman

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
#2 lore raw
Quoted 5 lines · Joel Becker
Quoted 4 lines · David Teigland

commit 3d48397962cdad2aa32df75cfdae980af9bce8cc

Author: David Teigland <[email protected]>
Date:   Mon Nov 10 16:16:07 2008 -0600
Quoted 8 lines
Quoted 6 lines

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.

Yep, looks good. I'll toss this in ocfs2.git.

	--Mark

--
Mark Fasheh