summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-05 13:57:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-05 13:57:53 -0700
commite305fc5ecd6420fadec5a8108852081fa2b89a17 (patch)
tree0f80db8fba1b7d285814f7a16046ae84f6909147 /mm
parent154f807e55977de75b1c12197c13ae14c28397b3 (diff)
parentd76b1590e06a63a3d8697168cd0aabf1c4b3cb3a (diff)
downloadblackbird-op-linux-e305fc5ecd6420fadec5a8108852081fa2b89a17.tar.gz
blackbird-op-linux-e305fc5ecd6420fadec5a8108852081fa2b89a17.zip
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: Fix kmem_cache_destroy() with SLAB_DESTROY_BY_RCU
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index b9f1491a58a1..b6276753626e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2594,8 +2594,6 @@ static inline int kmem_cache_close(struct kmem_cache *s)
*/
void kmem_cache_destroy(struct kmem_cache *s)
{
- if (s->flags & SLAB_DESTROY_BY_RCU)
- rcu_barrier();
down_write(&slub_lock);
s->refcount--;
if (!s->refcount) {
@@ -2606,6 +2604,8 @@ void kmem_cache_destroy(struct kmem_cache *s)
"still has objects.\n", s->name, __func__);
dump_stack();
}
+ if (s->flags & SLAB_DESTROY_BY_RCU)
+ rcu_barrier();
sysfs_slab_remove(s);
} else
up_write(&slub_lock);
OpenPOWER on IntegriCloud