diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-21 23:03:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-21 23:03:15 -0300 |
commit | e899966f626f1f657a4a7bac736c0b9ae5a243ea (patch) | |
tree | a4bb8362d871da67b41fee27bb85ad0bc83e0591 /mm/slab_common.c | |
parent | ba0d342ecc21fbbe2f6c178f4479944d1fb34f3b (diff) | |
parent | 4b660a7f5c8099d88d1a43d8ae138965112592c7 (diff) |
Merge tag 'v3.15-rc6' into patchwork
Linux 3.15-rc6
* tag 'v3.15-rc6': (1314 commits)
Linux 3.15-rc6
Btrfs: send, fix incorrect ref access when using extrefs
Btrfs: fix EIO on reading file after ioctl clone works on it
scripts/checksyscalls.sh: Make renameat optional
asm-generic: Add renameat2 syscall
ia64: add renameat2 syscall
parisc: add renameat2 syscall
m68k: add renameat2 syscall
sysfs: make sure read buffer is zeroed
ahci: imx: PLL clock needs 100us to settle down
PCI: Wrong register used to check pending traffic
target: fix memory leak on XCOPY
random: fix BUG_ON caused by accounting simplification
clk: tegra: Fix wrong value written to PLLE_AUX
staging: rtl8723au: Do not reset wdev->iftype in netdev_close()
ACPI / video: Revert native brightness quirk for ThinkPad T530
staging: rtl8723au: Use correct pipe type for USB interrupts
crush: decode and initialize chooseleaf_vary_r
libceph: fix corruption when using page_count 0 page in rbd
arm64: fix pud_huge() for 2-level pagetables
...
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r-- | mm/slab_common.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index f3cfccf76dd..102cc6fca3d 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -323,6 +323,12 @@ static int kmem_cache_destroy_memcg_children(struct kmem_cache *s) } #endif /* CONFIG_MEMCG_KMEM */ +void slab_kmem_cache_release(struct kmem_cache *s) +{ + kfree(s->name); + kmem_cache_free(kmem_cache, s); +} + void kmem_cache_destroy(struct kmem_cache *s) { get_online_cpus(); @@ -352,8 +358,11 @@ void kmem_cache_destroy(struct kmem_cache *s) rcu_barrier(); memcg_free_cache_params(s); - kfree(s->name); - kmem_cache_free(kmem_cache, s); +#ifdef SLAB_SUPPORTS_SYSFS + sysfs_slab_remove(s); +#else + slab_kmem_cache_release(s); +#endif goto out_put_cpus; out_unlock: |