* Re: [Linux-ATM-General] [PATCH] ATM - remove unnecessary GFP_ATOMIC allocation
[not found] <20030905115308.GA96209@compsoc.man.ac.uk>
@ 2003-09-05 12:52 ` chas williams
2003-09-11 23:39 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: chas williams @ 2003-09-05 12:52 UTC (permalink / raw)
To: davem, John Levon; +Cc: linux-atm-general, netdev
In message <20030905115308.GA96209@compsoc.man.ac.uk>,John Levon writes:
>There's no reason to allocate with GFP_ATOMIC in __alloc_atm_dev(). It has one
>callsite that is not under a spin lock (quick audit of drivers calling
>atm_dev_register() too).
it used to be under a spinlock (the infamous atm global spinlock). that's
no longer the case so it doesnt need to be ATOMIC anymore. i probably
missed it when i fixed the spinlock.
dave, please apply to 2.6 (and 2.4) --thanks
[ATM]: remove unnecessary GFP_ATOMIC allocation (from levon@movementarian.org)
diff -Naurp -X dontdiff linux-cvs/net/atm/resources.c linux-fixes/net/atm/resources.c
--- linux-cvs/net/atm/resources.c 2003-07-09 14:19:52.000000000 +0100
+++ linux-fixes/net/atm/resources.c 2003-09-05 13:14:08.000000000 +0100
@@ -30,7 +30,7 @@
{
struct atm_dev *dev;
- dev = kmalloc(sizeof(*dev), GFP_ATOMIC);
+ dev = kmalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return NULL;
memset(dev, 0, sizeof(*dev));
^ permalink raw reply [flat|nested] 2+ messages in thread