diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 6 | ||||
-rw-r--r-- | fs/bio.c | 3 | ||||
-rw-r--r-- | fs/dcache.c | 8 |
3 files changed, 5 insertions, 12 deletions
@@ -68,10 +68,8 @@ static void aio_queue_work(struct kioctx *); | |||
68 | */ | 68 | */ |
69 | static int __init aio_setup(void) | 69 | static int __init aio_setup(void) |
70 | { | 70 | { |
71 | kiocb_cachep = kmem_cache_create("kiocb", sizeof(struct kiocb), | 71 | kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
72 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | 72 | kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
73 | kioctx_cachep = kmem_cache_create("kioctx", sizeof(struct kioctx), | ||
74 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | ||
75 | 73 | ||
76 | aio_wq = create_workqueue("aio"); | 74 | aio_wq = create_workqueue("aio"); |
77 | 75 | ||
@@ -1193,8 +1193,7 @@ static void __init biovec_init_slabs(void) | |||
1193 | 1193 | ||
1194 | static int __init init_bio(void) | 1194 | static int __init init_bio(void) |
1195 | { | 1195 | { |
1196 | bio_slab = kmem_cache_create("bio", sizeof(struct bio), 0, | 1196 | bio_slab = KMEM_CACHE(bio, SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
1197 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); | ||
1198 | 1197 | ||
1199 | biovec_init_slabs(); | 1198 | biovec_init_slabs(); |
1200 | 1199 | ||
diff --git a/fs/dcache.c b/fs/dcache.c index d68631f18df1..d1bf5d8aeb5a 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -2052,12 +2052,8 @@ static void __init dcache_init(unsigned long mempages) | |||
2052 | * but it is probably not worth it because of the cache nature | 2052 | * but it is probably not worth it because of the cache nature |
2053 | * of the dcache. | 2053 | * of the dcache. |
2054 | */ | 2054 | */ |
2055 | dentry_cache = kmem_cache_create("dentry_cache", | 2055 | dentry_cache = KMEM_CACHE(dentry, |
2056 | sizeof(struct dentry), | 2056 | SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD); |
2057 | 0, | ||
2058 | (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| | ||
2059 | SLAB_MEM_SPREAD), | ||
2060 | NULL, NULL); | ||
2061 | 2057 | ||
2062 | set_shrinker(DEFAULT_SEEKS, shrink_dcache_memory); | 2058 | set_shrinker(DEFAULT_SEEKS, shrink_dcache_memory); |
2063 | 2059 | ||