ib_srpt: Eliminate srpt_rdma_ch.wait_queue

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-06-02 14:27:17 +00:00
parent 2951e5a306
commit 1bbda55d42
2 changed files with 4 additions and 9 deletions
+4 -7
View File
@@ -1873,7 +1873,7 @@ static void srpt_completion(struct ib_cq *cq, void *ctx)
atomic_inc(&ch->processing_compl);
switch (thread) {
case MODE_IB_COMPLETION_IN_THREAD:
wake_up_interruptible(&ch->wait_queue);
wake_up_process(ch->thread);
break;
case MODE_IB_COMPLETION_IN_SIRQ:
srpt_process_completion(cq, ch, SCST_CONTEXT_THREAD);
@@ -1895,10 +1895,9 @@ static int srpt_compl_thread(void *arg)
ch = arg;
BUG_ON(!ch);
while (!kthread_should_stop()) {
wait_event_interruptible(ch->wait_queue,
(srpt_process_completion(ch->cq, ch,
SCST_CONTEXT_THREAD),
kthread_should_stop()));
set_current_state(TASK_INTERRUPTIBLE);
srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD);
schedule();
}
return 0;
}
@@ -1964,8 +1963,6 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
goto err_destroy_qp;
if (thread == MODE_IB_COMPLETION_IN_THREAD) {
init_waitqueue_head(&ch->wait_queue);
TRACE_DBG("creating IB completion thread for session %s",
ch->sess_name);
-2
View File
@@ -245,7 +245,6 @@ enum rdma_ch_state {
/**
* struct srpt_rdma_ch - RDMA channel.
* @wait_queue: Allows the kernel thread to wait for more work.
* @thread: Kernel thread that processes the IB queues associated with
* the channel.
* @cm_id: IB CM ID associated with the channel.
@@ -273,7 +272,6 @@ enum rdma_ch_state {
* @sess_name: SCST session name.
*/
struct srpt_rdma_ch {
wait_queue_head_t wait_queue;
struct task_struct *thread;
struct ib_cm_id *cm_id;
struct ib_qp *qp;