Skip to content

Commit 9250e52

Browse files
committed
dlm: remove dlm_send_rcom_lookup_dump
This function was only for debugging. It would be called in a condition that should not happen, and should probably have been removed from the final version of the original commit. Remove it because it does mutex lock under spin lock. Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 9e1b021 commit 9250e52

3 files changed

Lines changed: 1 addition & 21 deletions

File tree

‎fs/dlm/lock.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ int dlm_master_lookup(struct dlm_ls *ls, int from_nodeid, char *name, int len,
10031003
if (r->res_master_nodeid == our_nodeid) {
10041004
log_error(ls, "from_master %d our_master", from_nodeid);
10051005
dlm_dump_rsb(r);
1006-
dlm_send_rcom_lookup_dump(r, from_nodeid);
10071006
goto out_found;
10081007
}
10091008

‎fs/dlm/rcom.c‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -338,25 +338,6 @@ int dlm_send_rcom_lookup(struct dlm_rsb *r, int dir_nodeid)
338338
return error;
339339
}
340340

341-
int dlm_send_rcom_lookup_dump(struct dlm_rsb *r, int to_nodeid)
342-
{
343-
struct dlm_rcom *rc;
344-
struct dlm_mhandle *mh;
345-
struct dlm_ls *ls = r->res_ls;
346-
int error;
347-
348-
error = create_rcom(ls, to_nodeid, DLM_RCOM_LOOKUP, r->res_length,
349-
&rc, &mh);
350-
if (error)
351-
goto out;
352-
memcpy(rc->rc_buf, r->res_name, r->res_length);
353-
rc->rc_id = 0xFFFFFFFF;
354-
355-
send_rcom(ls, mh, rc);
356-
out:
357-
return error;
358-
}
359-
360341
static void receive_rcom_lookup(struct dlm_ls *ls, struct dlm_rcom *rc_in)
361342
{
362343
struct dlm_rcom *rc;
@@ -368,6 +349,7 @@ static void receive_rcom_lookup(struct dlm_ls *ls, struct dlm_rcom *rc_in)
368349
if (error)
369350
return;
370351

352+
/* Old code would send this special id to trigger a debug dump. */
371353
if (rc_in->rc_id == 0xFFFFFFFF) {
372354
log_error(ls, "receive_rcom_lookup dump from %d", nodeid);
373355
dlm_dump_rsb_name(ls, rc_in->rc_buf, len);

‎fs/dlm/rcom.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
int dlm_rcom_status(struct dlm_ls *ls, int nodeid, uint32_t status_flags);
1818
int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name,int last_len);
1919
int dlm_send_rcom_lookup(struct dlm_rsb *r, int dir_nodeid);
20-
int dlm_send_rcom_lookup_dump(struct dlm_rsb *r, int to_nodeid);
2120
int dlm_send_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb);
2221
void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid);
2322
int dlm_send_ls_not_ready(int nodeid, struct dlm_rcom *rc_in);

0 commit comments

Comments
 (0)