All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wengang Wang <wen.gang.wang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 4/5] ocfs2/dlm: copy lvb from lksb only when it's meaningful
Date: Thu, 26 Aug 2010 21:07:45 +0800	[thread overview]
Message-ID: <201008261310.o7PHoc65015692@acsinet15.oracle.com> (raw)

Copies lvb from lksb only when it's meaningful(not NULL).

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
---
 fs/ocfs2/dlm/dlmrecovery.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index fa6e5ae..6d2e3ca 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1184,7 +1184,8 @@ static void dlm_prepare_lvb_for_migration(struct dlm_lock *lock,
 		return;
 
 	if (dlm_lvb_is_empty(mres->lvb)) {
-		memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN);
+		if (lock->lksb->lvb)
+			memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN);
 		return;
 	}
 
-- 
1.7.2.1

             reply	other threads:[~2010-08-26 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 13:07 Wengang Wang [this message]
2010-09-10 23:40 ` [Ocfs2-devel] [PATCH 4/5] ocfs2/dlm: copy lvb from lksb only when it's meaningful Sunil Mushran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008261310.o7PHoc65015692@acsinet15.oracle.com \
    --to=wen.gang.wang@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.