Lines Matching refs:cm
273 int comm_seq; /* copy of cm->seq when nd->nodeid is set */
490 struct dlm_comm *cm;
492 cm = kzalloc(sizeof(struct dlm_comm), GFP_NOFS);
493 if (!cm)
496 config_item_init_type_name(&cm->item, name, &comm_type);
498 cm->seq = dlm_comm_count++;
499 if (!cm->seq)
500 cm->seq = dlm_comm_count++;
502 cm->nodeid = -1;
503 cm->local = 0;
504 cm->addr_count = 0;
505 cm->mark = 0;
506 return &cm->item;
511 struct dlm_comm *cm = config_item_to_comm(i);
512 if (local_comm == cm)
514 dlm_lowcomms_close(cm->nodeid);
515 while (cm->addr_count--)
516 kfree(cm->addr[cm->addr_count]);
522 struct dlm_comm *cm = config_item_to_comm(i);
523 kfree(cm);
617 struct dlm_comm *cm = config_item_to_comm(item);
618 int rc = kstrtoint(buf, 0, &cm->local);
622 if (cm->local && !local_comm)
623 local_comm = cm;
630 struct dlm_comm *cm = config_item_to_comm(item);
637 if (cm->addr_count >= DLM_MAX_ADDR_COUNT)
646 rv = dlm_lowcomms_addr(cm->nodeid, addr, len);
652 cm->addr[cm->addr_count++] = addr;
658 struct dlm_comm *cm = config_item_to_comm(item);
674 for (i = 0; i < cm->addr_count; i++) {
675 addr = cm->addr[i];
804 struct dlm_comm *cm = NULL;
813 cm = config_item_to_comm(i);
815 if (cm->nodeid != nodeid)
824 cm = NULL;
825 return cm;
828 static void put_comm(struct dlm_comm *cm)
830 config_item_put(&cm->item);
883 struct dlm_comm *cm = get_comm(nodeid);
884 if (!cm)
886 *seq = cm->seq;
887 put_comm(cm);
893 struct dlm_comm *cm;
895 cm = get_comm(nodeid);
896 if (!cm) {
901 if (cm->mark)
902 *mark = cm->mark;
906 put_comm(cm);