[openib-general] [PATCH] remove in_atomic

Michael S. Tsirkin mst at mellanox.co.il
Sun Jul 31 23:35:29 PDT 2005


in_atomic isnt a reliable way to check that we are in an atomic context.
Just schedule work, always, since most cq polling is currently done under
a spinlock, anyway.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: linux-2.6.12.2/drivers/infiniband/ulp/sdp/sdp_iocb.c
===================================================================
--- linux-2.6.12.2.orig/drivers/infiniband/ulp/sdp/sdp_iocb.c
+++ linux-2.6.12.2/drivers/infiniband/ulp/sdp/sdp_iocb.c
@@ -325,12 +325,8 @@ static void do_iocb_complete(void *arg)
 void sdp_iocb_complete(struct sdpc_iocb *iocb, ssize_t status)
 {
 	iocb->status = status;
-	
-	if (in_atomic() || irqs_disabled()) {
-		INIT_WORK(&iocb->completion, do_iocb_complete, (void *)iocb);
-		schedule_work(&iocb->completion);
-	} else
-		do_iocb_complete(iocb);
+	INIT_WORK(&iocb->completion, do_iocb_complete, (void *)iocb);
+	schedule_work(&iocb->completion);
 }
 
 /*

-- 
MST



More information about the general mailing list