In message <20030905115308.GA96209@xxxxxxxxxxxxxxxxx>,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@xxxxxxxxxxxxxxxxx)
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));
|