From fd91498266a1a2b4ae94efa71108126800f8c417 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Wed, 13 Dec 2006 10:38:45 -0600 Subject: [PATCH] --- yaml --- r: 46272 b: refs/heads/master c: da49f36f4f64feb281d7663be99e779b2aecc607 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/dlm/lock.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 863adbd3a94a..a436022f1062 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9e971b715dcc3cd5f4383f2815aaa7e5853d1f7b +refs/heads/master: da49f36f4f64feb281d7663be99e779b2aecc607 diff --git a/trunk/fs/dlm/lock.c b/trunk/fs/dlm/lock.c index 69ada5887078..cdf2cb9297fd 100644 --- a/trunk/fs/dlm/lock.c +++ b/trunk/fs/dlm/lock.c @@ -2144,12 +2144,24 @@ static void send_args(struct dlm_rsb *r, struct dlm_lkb *lkb, if (lkb->lkb_astaddr) ms->m_asts |= AST_COMP; - if (ms->m_type == DLM_MSG_REQUEST || ms->m_type == DLM_MSG_LOOKUP) - memcpy(ms->m_extra, r->res_name, r->res_length); + /* compare with switch in create_message; send_remove() doesn't + use send_args() */ - else if (lkb->lkb_lvbptr) + switch (ms->m_type) { + case DLM_MSG_REQUEST: + case DLM_MSG_LOOKUP: + memcpy(ms->m_extra, r->res_name, r->res_length); + break; + case DLM_MSG_CONVERT: + case DLM_MSG_UNLOCK: + case DLM_MSG_REQUEST_REPLY: + case DLM_MSG_CONVERT_REPLY: + case DLM_MSG_GRANT: + if (!lkb->lkb_lvbptr) + break; memcpy(ms->m_extra, lkb->lkb_lvbptr, r->res_ls->ls_lvblen); - + break; + } } static int send_common(struct dlm_rsb *r, struct dlm_lkb *lkb, int mstype)