[openib-general] [PATCH] use set_current_state() in SDP

Ralph Campbell ralphc at pathscale.com
Fri Feb 3 16:08:02 PST 2006


The set_current_state() macro should be used instead of setting the
task state directly.

Signed-off-by: Ralph Campbell <ralphc at pathscale.com>

Index: src/linux-kernel/infiniband/ulp/sdp/sdp_conn.c
===================================================================
--- src/linux-kernel/infiniband/ulp/sdp/sdp_conn.c	(revision 5294)
+++ src/linux-kernel/infiniband/ulp/sdp/sdp_conn.c	(working copy)
@@ -801,7 +801,7 @@
 
 	add_wait_queue_exclusive(&(conn->lock.waitq), &wait);
 	for (;;) {
-		current->state = TASK_UNINTERRUPTIBLE;
+		set_current_state(TASK_UNINTERRUPTIBLE);
 		spin_unlock_irqrestore(&(conn->lock.slock), f);
 		schedule();
 		spin_lock_irqsave(&(conn->lock.slock), f);
@@ -811,7 +811,7 @@
 			break;
 	}
 
-	current->state = TASK_RUNNING;
+	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&(conn->lock.waitq), &wait);
 }
 

-- 
Ralph Campbell <ralphc at pathscale.com>




More information about the general mailing list