diff options
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 17249994110f..7fb5fb036f90 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -490,13 +490,13 @@ static void reiserfs_put_super(struct super_block *s) | |||
490 | return; | 490 | return; |
491 | } | 491 | } |
492 | 492 | ||
493 | static kmem_cache_t *reiserfs_inode_cachep; | 493 | static struct kmem_cache *reiserfs_inode_cachep; |
494 | 494 | ||
495 | static struct inode *reiserfs_alloc_inode(struct super_block *sb) | 495 | static struct inode *reiserfs_alloc_inode(struct super_block *sb) |
496 | { | 496 | { |
497 | struct reiserfs_inode_info *ei; | 497 | struct reiserfs_inode_info *ei; |
498 | ei = (struct reiserfs_inode_info *) | 498 | ei = (struct reiserfs_inode_info *) |
499 | kmem_cache_alloc(reiserfs_inode_cachep, SLAB_KERNEL); | 499 | kmem_cache_alloc(reiserfs_inode_cachep, GFP_KERNEL); |
500 | if (!ei) | 500 | if (!ei) |
501 | return NULL; | 501 | return NULL; |
502 | return &ei->vfs_inode; | 502 | return &ei->vfs_inode; |
@@ -507,7 +507,7 @@ static void reiserfs_destroy_inode(struct inode *inode) | |||
507 | kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); | 507 | kmem_cache_free(reiserfs_inode_cachep, REISERFS_I(inode)); |
508 | } | 508 | } |
509 | 509 | ||
510 | static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) | 510 | static void init_once(void *foo, struct kmem_cache * cachep, unsigned long flags) |
511 | { | 511 | { |
512 | struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; | 512 | struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo; |
513 | 513 | ||
@@ -1549,13 +1549,12 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1549 | struct reiserfs_sb_info *sbi; | 1549 | struct reiserfs_sb_info *sbi; |
1550 | int errval = -EINVAL; | 1550 | int errval = -EINVAL; |
1551 | 1551 | ||
1552 | sbi = kmalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); | 1552 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); |
1553 | if (!sbi) { | 1553 | if (!sbi) { |
1554 | errval = -ENOMEM; | 1554 | errval = -ENOMEM; |
1555 | goto error; | 1555 | goto error; |
1556 | } | 1556 | } |
1557 | s->s_fs_info = sbi; | 1557 | s->s_fs_info = sbi; |
1558 | memset(sbi, 0, sizeof(struct reiserfs_sb_info)); | ||
1559 | /* Set default values for options: non-aggressive tails, RO on errors */ | 1558 | /* Set default values for options: non-aggressive tails, RO on errors */ |
1560 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); | 1559 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); |
1561 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ERROR_RO); | 1560 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ERROR_RO); |