Skip to contentSkip to conversation

netpoll: inverted down_trylock() test

PATCH Applied Dan Carpenter 2 participants 3 messages May 6, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netpoll: inverted down_trylock() test

The return value is reversed from mutex_trylock().

net/core/netpoll.c +1 -1
index a5802a8..cec074b 100644
@@ -206,7 +206,7 @@ static void netpoll_poll_dev(struct net_device *dev)
 	 * the dev_open/close paths use this to block netpoll activity
 	 * while changing device state
 	 */
-	if (!down_trylock(&ni->dev_lock))
+	if (down_trylock(&ni->dev_lock))
 		return;
 
 	if (!netif_running(dev)) {
#1 lore raw

This is needed in mainline actually. I typed -next by mistake.

regards,
dan carpenter

maintainer Applied
#2 lore raw

From: Dan Carpenter <[email protected]>
Date: Mon, 6 May 2013 16:00:24 +0300

Quoted 1 line

This is needed in mainline actually. I typed -next by mistake.

Applied.