]> err.no Git - linux-2.6/blobdiff - fs/openpromfs/inode.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6] / fs / openpromfs / inode.c
index 592a6402e8511e945c316aa6637a39e1f0698d44..d88173840082aad76ab84a2c086c3d06bb73bef9 100644 (file)
@@ -169,7 +169,7 @@ static const struct file_operations openprom_operations = {
 
 static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *);
 
-static struct inode_operations openprom_inode_operations = {
+static const struct inode_operations openprom_inode_operations = {
        .lookup         = openpromfs_lookup,
 };
 
@@ -262,7 +262,7 @@ found:
 
 static int openpromfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
 {
-       struct inode *inode = filp->f_dentry->d_inode;
+       struct inode *inode = filp->f_path.dentry->d_inode;
        struct op_inode_info *oi = OP_I(inode);
        struct device_node *dp = oi->u.node;
        struct device_node *child;
@@ -330,13 +330,13 @@ out:
        return 0;
 }
 
-static kmem_cache_t *op_inode_cachep;
+static struct kmem_cache *op_inode_cachep;
 
 static struct inode *openprom_alloc_inode(struct super_block *sb)
 {
        struct op_inode_info *oi;
 
-       oi = kmem_cache_alloc(op_inode_cachep, SLAB_KERNEL);
+       oi = kmem_cache_alloc(op_inode_cachep, GFP_KERNEL);
        if (!oi)
                return NULL;
 
@@ -364,7 +364,7 @@ static int openprom_remount(struct super_block *sb, int *flags, char *data)
        return 0;
 }
 
-static struct super_operations openprom_sops = { 
+static const struct super_operations openprom_sops = {
        .alloc_inode    = openprom_alloc_inode,
        .destroy_inode  = openprom_destroy_inode,
        .read_inode     = openprom_read_inode,
@@ -415,13 +415,11 @@ static struct file_system_type openprom_fs_type = {
        .kill_sb        = kill_anon_super,
 };
 
-static void op_inode_init_once(void *data, kmem_cache_t * cachep, unsigned long flags)
+static void op_inode_init_once(struct kmem_cache * cachep, void *data)
 {
        struct op_inode_info *oi = (struct op_inode_info *) data;
 
-       if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
-           SLAB_CTOR_CONSTRUCTOR)
-               inode_init_once(&oi->vfs_inode);
+       inode_init_once(&oi->vfs_inode);
 }
 
 static int __init init_openprom_fs(void)
@@ -433,7 +431,7 @@ static int __init init_openprom_fs(void)
                                            0,
                                            (SLAB_RECLAIM_ACCOUNT |
                                             SLAB_MEM_SPREAD),
-                                           op_inode_init_once, NULL);
+                                           op_inode_init_once);
        if (!op_inode_cachep)
                return -ENOMEM;