dlm: fix NULL ls usage
David Teigland
maintainerPATCH 1/1 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 <[email protected]>
fs/dlm/rcom.c +3 -4
@@ -386,8 +386,7 @@dlm_recover_process_copy (ls, rc_in); } -static int send_ls_not_ready (struct dlm_ls *ls,int nodeid, -struct dlm_rcom *rc_in) +static int send_ls_not_ready (int nodeid,struct dlm_rcom *rc_in) {struct dlm_rcom *rc;struct rcom_config *rf;
@@ -395,7 +394,7 @@char *mb;int mb_len =sizeof (struct dlm_rcom ) +sizeof (struct rcom_config ); - mh =dlm_lowcomms_get_buffer (nodeid, mb_len, ls->ls_allocation, &mb); + mh =dlm_lowcomms_get_buffer (nodeid, mb_len,GFP_NOFS , &mb);if (!mh)return -ENOBUFS ;memset (mb,0 , mb_len);
@@ -465,7 +464,7 @@log_print ("lockspace %x from %d type %x not found" , hd->h_lockspace, nodeid, rc->rc_type);if (rc->rc_type ==DLM_RCOM_STATUS ) -send_ls_not_ready (ls, nodeid, rc); +send_ls_not_ready (nodeid, rc);return ; }
Hi,
Now in the -nmw GFS2 git tree. Thanks,
Steve.
Quoted 37 lines · David Teigland
Fix regression in recent patch "[DLM] variable allocation" which attempts to dereference an "ls" struct when it's NULL.
Signed-off-by David Teigland <[email protected]>Index:
linux-quilt/fs/dlm/rcom.c
===================================================================fs/dlm/rcom.c +3
-4@@ -386,8 +386,7 @@dlm_recover_process_copy (ls, rc_in); } -static int send_ls_not_ready (struct dlm_ls *ls,int nodeid, -struct dlm_rcom *rc_in) +static int send_ls_not_ready (int nodeid,struct dlm_rcom *rc_in) {struct dlm_rcom *rc;struct rcom_config *rf;@@ -395,7 +394,7 @@char *mb;int mb_len =sizeof (struct dlm_rcom ) +sizeof (struct rcom_config ); - mh =dlm_lowcomms_get_buffer (nodeid, mb_len, ls->ls_allocation, &mb); + mh =dlm_lowcomms_get_buffer (nodeid, mb_len,GFP_NOFS , &mb);if (!mh)return -ENOBUFS ;memset (mb,0 , mb_len);@@ -465,7 +464,7 @@log_print ("lockspace %x from %d type %x not found" , hd->h_lockspace, nodeid, rc->rc_type);if (rc->rc_type ==DLM_RCOM_STATUS ) -send_ls_not_ready (ls, nodeid, rc); +send_ls_not_ready (nodeid, rc);return ; }