summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Love <rml@tech9.net>2002-09-24 01:37:09 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-09-24 01:37:09 -0700
commit7f644d00d25a416a4e583b3d190ab6b89167fd85 (patch)
tree90c66cfbc66486347d9fd86a0d15ed6b671738ab
parent5d6713099b1dcd0dd5a28dbb6c269d4909444ee5 (diff)
[PATCH] remove preempt workaround in slab.c
Before the irqs_disabled() check in preempt_schedule(), we worked around some locking issues in slab.c. Now that we will never preempt with interrupts disabled, we can remove those and clean things up. This is courtesy of Manfred Spraul.
-rw-r--r--mm/slab.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 0b77466803de..549cd2f465ea 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1357,11 +1357,7 @@ void* kmem_cache_alloc_batch(kmem_cache_t* cachep, int flags)
cc_entry(cc)[cc->avail++] =
kmem_cache_alloc_one_tail(cachep, slabp);
}
- /*
- * CAREFUL: do not enable preemption yet, the per-CPU
- * entries rely on us being atomic.
- */
- _raw_spin_unlock(&cachep->spinlock);
+ spin_unlock(&cachep->spinlock);
if (cc->avail)
return cc_entry(cc)[--cc->avail];
@@ -1389,8 +1385,6 @@ try_again:
STATS_INC_ALLOCMISS(cachep);
objp = kmem_cache_alloc_batch(cachep,flags);
local_irq_restore(save_flags);
- /* end of non-preemptible region */
- preempt_enable();
if (!objp)
goto alloc_new_slab_nolock;
return objp;