Skip to contentSkip to conversation

ATM - remove unnecessary GFP_ATOMIC allocation

PATCH Applied chas williams 2 participants 2 messages Sep 5, 2003 – Sep 11, 2003 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines · In message <[email protected]>,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 [email protected])

net/atm/resources.c +1 -1
diff -Naurp -X dontdiff linux-cvs/net/atm/resources.c linux-fixes/net/atm/resources.c
@@ -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));