[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080506030822.GA14111@gondor.apana.org.au>
Date: Tue, 6 May 2008 11:08:22 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: WANG Cong <xiyou.wangcong@...il.com>
Cc: linux-kernel@...r.kernel.org, davem@...emloft.net, akpm@...l.org,
netdev@...r.kernel.org
Subject: Re: [Patch] (revised) net/xfrm/xfrm_policy.c: replace timer with delayed_work
On Fri, May 02, 2008 at 01:35:55PM +0800, WANG Cong wrote:
>
> @@ -209,16 +210,16 @@ static void xfrm_policy_timer(unsigned long data)
> if (warn)
> km_policy_expired(xp, dir, 0, 0);
> if (next != LONG_MAX &&
> - !mod_timer(&xp->timer, jiffies + make_jiffies(next)))
> + !schedule_delayed_work(&xp->work, make_jiffies(next)))
> xfrm_pol_hold(xp);
I tried it and it pretty much crashed immediately :)
The problem is that schedule_delayed_work's return value is the
opposite of mod_timer. So you'll need to reverse the tests.
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists