aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/rcom.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2007-07-13 15:49:06 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-08-14 05:28:44 -0400
commit41684f9547455b395ffd65e5b7961067d20a2872 (patch)
tree8afb8cae66afe67246666c694d5731a876672f1b /fs/dlm/rcom.c
parent25720c2d73058f4f929f16093f60817ed52a285c (diff)
[DLM] fix NULL ls usage
Fix regression in recent patch "[DLM] variable allocation" which attempts to dereference an "ls" struct when it's NULL. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/rcom.c')
-rw-r--r--fs/dlm/rcom.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index e3a1527cbdbe..188b91c027e4 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -386,8 +386,7 @@ static void receive_rcom_lock_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
386 dlm_recover_process_copy(ls, rc_in); 386 dlm_recover_process_copy(ls, rc_in);
387} 387}
388 388
389static int send_ls_not_ready(struct dlm_ls *ls, int nodeid, 389static int send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in)
390 struct dlm_rcom *rc_in)
391{ 390{
392 struct dlm_rcom *rc; 391 struct dlm_rcom *rc;
393 struct rcom_config *rf; 392 struct rcom_config *rf;
@@ -395,7 +394,7 @@ static int send_ls_not_ready(struct dlm_ls *ls, int nodeid,
395 char *mb; 394 char *mb;
396 int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config); 395 int mb_len = sizeof(struct dlm_rcom) + sizeof(struct rcom_config);
397 396
398 mh = dlm_lowcomms_get_buffer(nodeid, mb_len, ls->ls_allocation, &mb); 397 mh = dlm_lowcomms_get_buffer(nodeid, mb_len, GFP_NOFS, &mb);
399 if (!mh) 398 if (!mh)
400 return -ENOBUFS; 399 return -ENOBUFS;
401 memset(mb, 0, mb_len); 400 memset(mb, 0, mb_len);
@@ -465,7 +464,7 @@ void dlm_receive_rcom(struct dlm_header *hd, int nodeid)
465 log_print("lockspace %x from %d type %x not found", 464 log_print("lockspace %x from %d type %x not found",
466 hd->h_lockspace, nodeid, rc->rc_type); 465 hd->h_lockspace, nodeid, rc->rc_type);
467 if (rc->rc_type == DLM_RCOM_STATUS) 466 if (rc->rc_type == DLM_RCOM_STATUS)
468 send_ls_not_ready(ls, nodeid, rc); 467 send_ls_not_ready(nodeid, rc);
469 return; 468 return;
470 } 469 }
471 470