* [Ocfs2-devel] [PATCH 4/5] ocfs2/dlm: copy lvb from lksb only when it's meaningful
@ 2010-08-26 13:07 Wengang Wang
2010-09-10 23:40 ` Sunil Mushran
0 siblings, 1 reply; 2+ messages in thread
From: Wengang Wang @ 2010-08-26 13:07 UTC (permalink / raw)
To: ocfs2-devel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [PATCH 4/5] ocfs2/dlm: copy lvb from lksb only when it's meaningful
2010-08-26 13:07 [Ocfs2-devel] [PATCH 4/5] ocfs2/dlm: copy lvb from lksb only when it's meaningful Wengang Wang
@ 2010-09-10 23:40 ` Sunil Mushran
0 siblings, 0 replies; 2+ messages in thread
From: Sunil Mushran @ 2010-09-10 23:40 UTC (permalink / raw)
To: ocfs2-devel
On 08/26/2010 06:07 AM, Wengang Wang wrote:
> 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;
> }
>
>
Patches 3 and 4 can be merged.
Also, in prepare_lvb_for_migration, we should use the name to determine
whether the locks should have lvb or not. If not, then just exit. If
they do,
then BUG.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-10 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26 13:07 [Ocfs2-devel] [PATCH 4/5] ocfs2/dlm: copy lvb from lksb only when it's meaningful Wengang Wang
2010-09-10 23:40 ` Sunil Mushran
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.