diff options
Diffstat (limited to 'fs/afs/super.c')
-rw-r--r-- | fs/afs/super.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c index 67d1f5c819ec..18d9b77ba40f 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -35,7 +35,7 @@ struct afs_mount_params { | |||
35 | struct afs_volume *volume; | 35 | struct afs_volume *volume; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | static void afs_i_init_once(void *foo, kmem_cache_t *cachep, | 38 | static void afs_i_init_once(void *foo, struct kmem_cache *cachep, |
39 | unsigned long flags); | 39 | unsigned long flags); |
40 | 40 | ||
41 | static int afs_get_sb(struct file_system_type *fs_type, | 41 | static int afs_get_sb(struct file_system_type *fs_type, |
@@ -65,7 +65,7 @@ static struct super_operations afs_super_ops = { | |||
65 | .put_super = afs_put_super, | 65 | .put_super = afs_put_super, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static kmem_cache_t *afs_inode_cachep; | 68 | static struct kmem_cache *afs_inode_cachep; |
69 | static atomic_t afs_count_active_inodes; | 69 | static atomic_t afs_count_active_inodes; |
70 | 70 | ||
71 | /*****************************************************************************/ | 71 | /*****************************************************************************/ |
@@ -242,14 +242,12 @@ static int afs_fill_super(struct super_block *sb, void *data, int silent) | |||
242 | kenter(""); | 242 | kenter(""); |
243 | 243 | ||
244 | /* allocate a superblock info record */ | 244 | /* allocate a superblock info record */ |
245 | as = kmalloc(sizeof(struct afs_super_info), GFP_KERNEL); | 245 | as = kzalloc(sizeof(struct afs_super_info), GFP_KERNEL); |
246 | if (!as) { | 246 | if (!as) { |
247 | _leave(" = -ENOMEM"); | 247 | _leave(" = -ENOMEM"); |
248 | return -ENOMEM; | 248 | return -ENOMEM; |
249 | } | 249 | } |
250 | 250 | ||
251 | memset(as, 0, sizeof(struct afs_super_info)); | ||
252 | |||
253 | afs_get_volume(params->volume); | 251 | afs_get_volume(params->volume); |
254 | as->volume = params->volume; | 252 | as->volume = params->volume; |
255 | 253 | ||
@@ -384,7 +382,7 @@ static void afs_put_super(struct super_block *sb) | |||
384 | /* | 382 | /* |
385 | * initialise an inode cache slab element prior to any use | 383 | * initialise an inode cache slab element prior to any use |
386 | */ | 384 | */ |
387 | static void afs_i_init_once(void *_vnode, kmem_cache_t *cachep, | 385 | static void afs_i_init_once(void *_vnode, struct kmem_cache *cachep, |
388 | unsigned long flags) | 386 | unsigned long flags) |
389 | { | 387 | { |
390 | struct afs_vnode *vnode = (struct afs_vnode *) _vnode; | 388 | struct afs_vnode *vnode = (struct afs_vnode *) _vnode; |
@@ -412,7 +410,7 @@ static struct inode *afs_alloc_inode(struct super_block *sb) | |||
412 | struct afs_vnode *vnode; | 410 | struct afs_vnode *vnode; |
413 | 411 | ||
414 | vnode = (struct afs_vnode *) | 412 | vnode = (struct afs_vnode *) |
415 | kmem_cache_alloc(afs_inode_cachep, SLAB_KERNEL); | 413 | kmem_cache_alloc(afs_inode_cachep, GFP_KERNEL); |
416 | if (!vnode) | 414 | if (!vnode) |
417 | return NULL; | 415 | return NULL; |
418 | 416 | ||