Explorar o código

netpoll: inverted down_trylock() test

The return value is reversed from mutex_trylock().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter %!s(int64=12) %!d(string=hai) anos
pai
achega
a3dbbc2bab
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/core/netpoll.c

+ 1 - 1
net/core/netpoll.c

@@ -206,7 +206,7 @@ static void netpoll_poll_dev(struct net_device *dev)
 	 * the dev_open/close paths use this to block netpoll activity
 	 * the dev_open/close paths use this to block netpoll activity
 	 * while changing device state
 	 * while changing device state
 	 */
 	 */
-	if (!down_trylock(&ni->dev_lock))
+	if (down_trylock(&ni->dev_lock))
 		return;
 		return;
 
 
 	if (!netif_running(dev)) {
 	if (!netif_running(dev)) {