Lines Matching refs:msg

689 	struct dlm_msg *msg = container_of(kref, struct dlm_msg, ref);  in dlm_msg_release()  local
691 kref_put(&msg->entry->ref, dlm_page_release); in dlm_msg_release()
692 dlm_free_msg(msg); in dlm_msg_release()
697 struct dlm_msg *msg, *tmp; in free_entry() local
699 list_for_each_entry_safe(msg, tmp, &e->msgs, list) { in free_entry()
700 if (msg->orig_msg) { in free_entry()
701 msg->orig_msg->retransmit = false; in free_entry()
702 kref_put(&msg->orig_msg->ref, dlm_msg_release); in free_entry()
705 list_del(&msg->list); in free_entry()
706 kref_put(&msg->ref, dlm_msg_release); in free_entry()
903 struct msghdr msg; in receive_from_sock() local
918 memset(&msg, 0, sizeof(msg)); in receive_from_sock()
919 msg.msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL; in receive_from_sock()
922 ret = kernel_recvmsg(con->sock, &msg, &iov, 1, iov.iov_len, in receive_from_sock()
923 msg.msg_flags); in receive_from_sock()
1228 struct dlm_msg *msg; in dlm_lowcomms_new_msg_con() local
1230 msg = dlm_allocate_msg(allocation); in dlm_lowcomms_new_msg_con()
1231 if (!msg) in dlm_lowcomms_new_msg_con()
1234 kref_init(&msg->ref); in dlm_lowcomms_new_msg_con()
1238 dlm_free_msg(msg); in dlm_lowcomms_new_msg_con()
1242 msg->retransmit = false; in dlm_lowcomms_new_msg_con()
1243 msg->orig_msg = NULL; in dlm_lowcomms_new_msg_con()
1244 msg->ppc = *ppc; in dlm_lowcomms_new_msg_con()
1245 msg->len = len; in dlm_lowcomms_new_msg_con()
1246 msg->entry = e; in dlm_lowcomms_new_msg_con()
1248 return msg; in dlm_lowcomms_new_msg_con()
1260 struct dlm_msg *msg; in dlm_lowcomms_new_msg() local
1278 msg = dlm_lowcomms_new_msg_con(con, len, allocation, ppc, cb, data); in dlm_lowcomms_new_msg()
1279 if (!msg) { in dlm_lowcomms_new_msg()
1285 kref_get(&msg->ref); in dlm_lowcomms_new_msg()
1287 msg->idx = idx; in dlm_lowcomms_new_msg()
1288 return msg; in dlm_lowcomms_new_msg()
1292 static void _dlm_lowcomms_commit_msg(struct dlm_msg *msg) in _dlm_lowcomms_commit_msg() argument
1294 struct writequeue_entry *e = msg->entry; in _dlm_lowcomms_commit_msg()
1299 kref_get(&msg->ref); in _dlm_lowcomms_commit_msg()
1300 list_add(&msg->list, &e->msgs); in _dlm_lowcomms_commit_msg()
1319 void dlm_lowcomms_commit_msg(struct dlm_msg *msg) in dlm_lowcomms_commit_msg() argument
1321 _dlm_lowcomms_commit_msg(msg); in dlm_lowcomms_commit_msg()
1322 srcu_read_unlock(&connections_srcu, msg->idx); in dlm_lowcomms_commit_msg()
1324 kref_put(&msg->ref, dlm_msg_release); in dlm_lowcomms_commit_msg()
1328 void dlm_lowcomms_put_msg(struct dlm_msg *msg) in dlm_lowcomms_put_msg() argument
1330 kref_put(&msg->ref, dlm_msg_release); in dlm_lowcomms_put_msg()
1334 int dlm_lowcomms_resend_msg(struct dlm_msg *msg) in dlm_lowcomms_resend_msg() argument
1339 if (msg->retransmit) in dlm_lowcomms_resend_msg()
1342 msg_resend = dlm_lowcomms_new_msg_con(msg->entry->con, msg->len, in dlm_lowcomms_resend_msg()
1347 msg->retransmit = true; in dlm_lowcomms_resend_msg()
1348 kref_get(&msg->ref); in dlm_lowcomms_resend_msg()
1349 msg_resend->orig_msg = msg; in dlm_lowcomms_resend_msg()
1351 memcpy(ppc, msg->ppc, msg->len); in dlm_lowcomms_resend_msg()
1363 struct msghdr msg = { in send_to_sock() local
1382 iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, len); in send_to_sock()
1383 ret = sock_sendmsg(con->sock, &msg); in send_to_sock()