aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/dlm/lock.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 69ada5887078..cdf2cb9297fd 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -2144,12 +2144,24 @@ static void send_args(struct dlm_rsb *r, struct dlm_lkb *lkb,
2144 if (lkb->lkb_astaddr) 2144 if (lkb->lkb_astaddr)
2145 ms->m_asts |= AST_COMP; 2145 ms->m_asts |= AST_COMP;
2146 2146
2147 if (ms->m_type == DLM_MSG_REQUEST || ms->m_type == DLM_MSG_LOOKUP) 2147 /* compare with switch in create_message; send_remove() doesn't
2148 memcpy(ms->m_extra, r->res_name, r->res_length); 2148 use send_args() */
2149 2149
2150 else if (lkb->lkb_lvbptr) 2150 switch (ms->m_type) {
2151 case DLM_MSG_REQUEST:
2152 case DLM_MSG_LOOKUP:
2153 memcpy(ms->m_extra, r->res_name, r->res_length);
2154 break;
2155 case DLM_MSG_CONVERT:
2156 case DLM_MSG_UNLOCK:
2157 case DLM_MSG_REQUEST_REPLY:
2158 case DLM_MSG_CONVERT_REPLY:
2159 case DLM_MSG_GRANT:
2160 if (!lkb->lkb_lvbptr)
2161 break;
2151 memcpy(ms->m_extra, lkb->lkb_lvbptr, r->res_ls->ls_lvblen); 2162 memcpy(ms->m_extra, lkb->lkb_lvbptr, r->res_ls->ls_lvblen);
2152 2163 break;
2164 }
2153} 2165}
2154 2166
2155static int send_common(struct dlm_rsb *r, struct dlm_lkb *lkb, int mstype) 2167static int send_common(struct dlm_rsb *r, struct dlm_lkb *lkb, int mstype)