aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-11-27 14:18:41 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-11-30 10:37:08 -0500
commit1babdb453138f17b8ed3d1d5711089c4e2fa5ace (patch)
treecff82b8349a633cbf770b13522fb180d39f163c2
parentaed3255f2267e2d1d95b9cf7f2995ce24e6c873b (diff)
[DLM] fix size of STATUS_REPLY message
When the not_ready routine sends a "fake" status reply with blank status flags, it needs to use the correct size for a normal STATUS_REPLY by including the size of the would-be config parameters. We also fill in the non-existant config parameters with an invalid lvblen value so it's easier to notice if these invalid paratmers are ever being used. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r--fs/dlm/rcom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index 87b12f7d3d22..6ac195cec027 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -370,9 +370,10 @@ static void receive_rcom_lock_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
370static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in) 370static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
371{ 371{
372 struct dlm_rcom *rc; 372 struct dlm_rcom *rc;
373 struct rcom_config *rf;
373 struct dlm_mhandle *mh; 374 struct dlm_mhandle *mh;
374 char *mb; 375 char *mb;
375 int mb_len = sizeof(struct dlm_rcom); 376 int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config);
376 377
377 mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_KERNEL, &mb); 378 mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_KERNEL, &mb);
378 if (!mh) 379 if (!mh)
@@ -391,6 +392,9 @@ static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
391 rc->rc_id = rc_in->rc_id; 392 rc->rc_id = rc_in->rc_id;
392 rc->rc_result = -ESRCH; 393 rc->rc_result = -ESRCH;
393 394
395 rf = (struct rcom_config *) rc->rc_buf;
396 rf->rf_lvblen = -1;
397
394 dlm_rcom_out(rc); 398 dlm_rcom_out(rc);
395 dlm_lowcomms_commit_buffer(mh); 399 dlm_lowcomms_commit_buffer(mh);
396 400