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

Ralph Campbell ralphc at pathscale.com
Fri Feb 3 17:51:17 PST 2006


On Fri, 2006-02-03 at 17:06 -0800, Roland Dreier wrote:
> I think both of these places can use __set_current_state().
> 
>  - R.

Good point.  Here is the updated patch.

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