Lines Matching defs:msg_wq

70 	struct sendmsg_wait_queue *msg_wq;
73 msg_wq = (struct sendmsg_wait_queue *)container_of(kref,
75 con = msg_wq->head.peer;
76 idr_remove(&con->msg_idr, msg_wq->head.msg_id);
79 kfree(msg_wq->buf);
80 if (msg_wq->recv_info.local_filp)
81 fput(msg_wq->recv_info.local_filp);
82 kfree(msg_wq);
86 void msg_put(struct sendmsg_wait_queue *msg_wq)
88 kref_put_lock(&msg_wq->head.ref, msg_release,
89 &msg_wq->head.peer->idr_lock);
99 static int msg_init(struct hmdfs_peer *con, struct sendmsg_wait_queue *msg_wq,
103 struct file_recv_info *recv_info = &msg_wq->recv_info;
105 ret = hmdfs_alloc_msg_idr(con, MSG_IDR_MESSAGE_SYNC, msg_wq, operations);
109 atomic_set(&msg_wq->valid, MSG_Q_SEND);
110 init_waitqueue_head(&msg_wq->response_q);
112 msg_wq->start = jiffies;
371 struct sendmsg_wait_queue *msg_wq)
381 list_add(&msg_wq->async_msg, &sbi->async_readdir_msg_list);
388 struct sendmsg_wait_queue *msg_wq)
393 list_del(&msg_wq->async_msg);
402 struct sendmsg_wait_queue *msg_wq = NULL;
437 msg_wq = kzalloc(sizeof(*msg_wq), GFP_KERNEL);
438 if (!msg_wq) {
442 ret = msg_init(con, msg_wq, sm->operations);
444 kfree(msg_wq);
445 msg_wq = NULL;
449 head->msg_id = cpu_to_le32(msg_wq->head.msg_id);
451 msg_wq->recv_info.local_filp = sm->local_filp;
473 ret = hmdfs_record_async_readdir(con, msg_wq);
475 atomic_set(&msg_wq->recv_info.state, FILE_RECV_ERR_SPC);
481 msg_wq->response_q,
482 (atomic_read(&msg_wq->valid) == MSG_Q_END_RECV), timeout * HZ);
485 hmdfs_untrack_async_readdir(con, msg_wq);
492 atomic_set(&msg_wq->recv_info.state, FILE_RECV_ERR_NET);
498 sm->out_buf = msg_wq->buf;
499 msg_wq->buf = NULL;
500 sm->out_len = msg_wq->size - sizeof(struct hmdfs_head_cmd);
501 ret = msg_wq->ret;
504 if (msg_wq)
505 msg_put(msg_wq);