]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] remove preempt workaround in slab.c
authorRobert Love <rml@tech9.net>
Tue, 24 Sep 2002 08:37:09 +0000 (01:37 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 24 Sep 2002 08:37:09 +0000 (01:37 -0700)
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.

mm/slab.c

index 0b77466803de321b70e19692fc53dc3396d75dae..549cd2f465ea97482bc0c0ee37e5f7ea1a68d68b 100644 (file)
--- 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;