[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1J35d6-00041l-00@gondolin.me.apana.org.au>
Date: Fri, 14 Dec 2007 16:10:44 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: akpm@...ux-foundation.org
Cc: davem@...emloft.net, netdev@...r.kernel.org,
akpm@...ux-foundation.org
Subject: Re: [patch 2/4] net: use mutex_is_locked() for ASSERT_RTNL()
akpm@...ux-foundation.org wrote:
>
> diff -puN drivers/net/cxgb3/cxgb3_main.c~net-use-mutex_is_locked-for-assert_rtnl drivers/net/cxgb3/cxgb3_main.c
> --- a/drivers/net/cxgb3/cxgb3_main.c~net-use-mutex_is_locked-for-assert_rtnl
> +++ a/drivers/net/cxgb3/cxgb3_main.c
> @@ -2191,7 +2191,7 @@ static void check_t3b2_mac(struct adapte
> {
> int i;
>
> - if (!rtnl_trylock()) /* synchronize with ifdown */
> + if (rtnl_is_locked()) /* synchronize with ifdown */
> return;
>
> for_each_port(adapter, i) {
> @@ -2219,7 +2219,6 @@ static void check_t3b2_mac(struct adapte
> p->mac.stats.num_resets++;
> }
> }
> - rtnl_unlock();
This doesn't look right. It seems that they really want trylock
here so we should just fix it by removing the bang.
Also, does ASSERT_RTNL still warn when someone calls it from an
atomic context? We definitely don't want to lose that check.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists