]> err.no Git - linux-2.6/blobdiff - fs/hfsplus/super.c
Pull vector-domain into release branch
[linux-2.6] / fs / hfsplus / super.c
index 0f513c6bf8434adfc311c57e6829e9b3c23663e6..6d87a2a9534d4baa56dbd466016106b78d87daa9 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/init.h>
 #include <linux/pagemap.h>
 #include <linux/fs.h>
-#include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/vfs.h>
 #include <linux/nls.h>
@@ -260,7 +259,7 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
        return 0;
 }
 
-static struct super_operations hfsplus_sops = {
+static const struct super_operations hfsplus_sops = {
        .alloc_inode    = hfsplus_alloc_inode,
        .destroy_inode  = hfsplus_destroy_inode,
        .read_inode     = hfsplus_read_inode,
@@ -284,11 +283,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
        struct nls_table *nls = NULL;
        int err = -EINVAL;
 
-       sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL);
+       sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
        if (!sbi)
                return -ENOMEM;
 
-       memset(sbi, 0, sizeof(HFSPLUS_SB(sb)));
        sb->s_fs_info = sbi;
        INIT_HLIST_HEAD(&sbi->rsrc_inodes);
        hfsplus_fill_defaults(sbi);
@@ -382,6 +380,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
                iput(root);
                goto cleanup;
        }
+       sb->s_root->d_op = &hfsplus_dentry_operations;
 
        str.len = sizeof(HFSP_HIDDENDIR_NAME) - 1;
        str.name = HFSP_HIDDENDIR_NAME;
@@ -471,8 +470,7 @@ static void hfsplus_init_once(void *p, struct kmem_cache *cachep, unsigned long
 {
        struct hfsplus_inode_info *i = p;
 
-       if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR)
-               inode_init_once(&i->vfs_inode);
+       inode_init_once(&i->vfs_inode);
 }
 
 static int __init init_hfsplus_fs(void)