dazuko-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dazuko-devel] dazukofs patch for 2.6.18


From: Lino Sanfilippo
Subject: [Dazuko-devel] dazukofs patch for 2.6.18
Date: Fri, 28 Nov 2008 13:03:12 +0100
User-agent: IceDove 1.5.0.14eol (X11/20080724)



Hi John,

we plan to ship dazuko source code together with the next release of our workstation/server software
to ease software setup for the user.
To avoid a mixture of dazukoFS and dazuko 2 code for the different kernels, we would like to provide dazukoFS for as many kernels as possible (mainly the ones with long time support).
For this reason we ported dazukoFS to 2.6.18 as a first step.
Would you like to add this (and possibly following) patch(es) to your repository to support the older kernels?

However, the patch for 2.6.18 is applied to this mail. Since device_create() behaves different in 2.6.18 it is not used and dazuko device files are not created by the module itself. This would
currently have to be done manually or by a shell script.

Greetings,
Lino Sanfilippo


Geschäftsführender Gesellschafter: Tjark Auerbach
Sitz der Gesellschaft: Tettnang
Handelsregister: Amtsgericht Ulm, HRB 630992
ALLGEMEINE GESCHÄFTSBEDINGUNGEN
Es gelten unsere Allgemeinen Geschäftsbedingungen
(AGB). Sie finden sie in der jeweils gültigen Fassung
im Internet unter http://www.avira.de/agb
***************************************************
diff -rup dazukofs-3.0.0-rc3/ctrl_dev.c dazukofs-3.0.0-rc3-2.6.18MOD/ctrl_dev.c
--- dazukofs-3.0.0-rc3/ctrl_dev.c       2008-10-25 00:58:25.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/ctrl_dev.c     2008-11-28 09:57:34.000000000 
+0100
@@ -167,34 +167,19 @@ int dazukofs_ctrl_dev_init(int dev_major
                           struct class *dazukofs_class)
 {
        int err = 0;
-       struct device *dev;
 
        /* setup cdev for control */
        cdev_init(&ctrl_cdev, &ctrl_fops);
        ctrl_cdev.owner = THIS_MODULE;
        err = cdev_add(&ctrl_cdev, MKDEV(dev_major, dev_minor), 1);
        if (err)
-               goto error_out1;
-
-       /* create control device */
-       dev = device_create(dazukofs_class, NULL, MKDEV(dev_major, dev_minor),
-                           NULL, "%s.ctrl", DEVICE_NAME);
-       if (IS_ERR(dev)) {
-               err = PTR_ERR(dev);
-               goto error_out2;
-       }
+               return err;
 
        return 0;
-
-error_out2:
-       cdev_del(&ctrl_cdev);
-error_out1:
-       return err;
 }
 
 void dazukofs_ctrl_dev_destroy(int dev_major, int dev_minor,
                               struct class *dazukofs_class)
 {
-       device_destroy(dazukofs_class, MKDEV(dev_major, dev_minor));
        cdev_del(&ctrl_cdev);
 }
diff -rup dazukofs-3.0.0-rc3/dazukofs_fs.h 
dazukofs-3.0.0-rc3-2.6.18MOD/dazukofs_fs.h
--- dazukofs-3.0.0-rc3/dazukofs_fs.h    2008-10-25 00:07:38.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/dazukofs_fs.h  2008-11-28 09:47:29.000000000 
+0100
@@ -54,6 +54,37 @@ struct dazukofs_file_info {
        struct file *lower_file;
 };
 
+void fsstack_copy_inode_size(struct inode *dst, const struct inode *src);
+
+static inline
+void fsstack_copy_attr_atime(struct inode *dst, const struct inode *src)
+{
+       dst->i_atime = src->i_atime;
+}
+
+static inline
+void fsstack_copy_attr_times(struct inode *dst, const struct inode *src)
+{
+       dst->i_atime = src->i_atime;
+       dst->i_mtime = src->i_mtime;
+       dst->i_ctime = src->i_ctime;
+}
+
+static inline 
+void fsstack_copy_attr_all(struct inode *dst, const struct inode *src)
+{
+       dst->i_mode = src->i_mode;
+       dst->i_uid = src->i_uid;
+       dst->i_gid = src->i_gid;
+       dst->i_rdev = src->i_rdev;
+       dst->i_atime = src->i_atime;
+       dst->i_mtime = src->i_mtime;
+       dst->i_ctime = src->i_ctime;
+       dst->i_blkbits = src->i_blkbits;
+       dst->i_flags = src->i_flags;
+}
+
+
 static inline
 struct dazukofs_sb_info *GET_SB_INFO(struct super_block *upper_sb)
 {
diff -rup dazukofs-3.0.0-rc3/dentry.c dazukofs-3.0.0-rc3-2.6.18MOD/dentry.c
--- dazukofs-3.0.0-rc3/dentry.c 2008-09-24 20:42:48.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/dentry.c       2008-11-28 09:47:29.000000000 
+0100
@@ -25,7 +25,6 @@
 #include <linux/fs.h>
 #include <linux/namei.h>
 #include <linux/mount.h>
-#include <linux/fs_stack.h>
 #include "dazukofs_fs.h"
 
 extern struct kmem_cache *dazukofs_dentry_info_cachep;
@@ -66,19 +65,19 @@ static int dazukofs_d_revalidate(struct 
 
        lower_mnt = GET_LOWER_MNT(dentry);
 
-       vfsmount_save = nd->path.mnt;
-       dentry_save = nd->path.dentry;
+       vfsmount_save = nd->mnt;
+       dentry_save = nd->dentry;
 
-       nd->path.mnt = mntget(lower_mnt);
-       nd->path.dentry = dget(lower_dentry);
+       nd->mnt = mntget(lower_mnt);
+       nd->dentry = dget(lower_dentry);
 
        valid = lower_dentry->d_op->d_revalidate(lower_dentry, nd);
 
        mntput(lower_mnt);
        dput(lower_dentry);
 
-       nd->path.mnt = vfsmount_save;
-       nd->path.dentry = dentry_save;
+       nd->mnt = vfsmount_save;
+       nd->dentry = dentry_save;
 
        /* update the inode, even if d_revalidate() != 1 */
        if (dentry->d_inode) {
@@ -86,7 +85,7 @@ static int dazukofs_d_revalidate(struct 
 
                lower_inode = GET_LOWER_INODE(dentry->d_inode);
 
-                fsstack_copy_attr_all(dentry->d_inode, lower_inode, NULL);
+                fsstack_copy_attr_all(dentry->d_inode, lower_inode);
         }
 out:
         return valid;
diff -rup dazukofs-3.0.0-rc3/event.c dazukofs-3.0.0-rc3-2.6.18MOD/event.c
--- dazukofs-3.0.0-rc3/event.c  2008-10-25 00:07:07.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/event.c        2008-11-28 09:47:29.000000000 
+0100
@@ -23,7 +23,6 @@
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/mount.h>
-#include <linux/freezer.h>
 
 #include "dazukofs_fs.h"
 #include "dev.h"
@@ -103,32 +102,32 @@ int dazukofs_init_events(void)
        dazukofs_group_cachep =
                kmem_cache_create("dazukofs_group_cache",
                                  sizeof(struct dazukofs_group), 0,
-                                 SLAB_HWCACHE_ALIGN, NULL);
+                                 SLAB_HWCACHE_ALIGN, NULL, NULL);
        if (!dazukofs_group_cachep)
                goto error_out;
 
        dazukofs_event_container_cachep =
                kmem_cache_create("dazukofs_event_container_cache",
                                  sizeof(struct dazukofs_event_container), 0,
-                                 SLAB_HWCACHE_ALIGN, NULL);
+                                 SLAB_HWCACHE_ALIGN, NULL, NULL);
        if (!dazukofs_event_container_cachep)
                goto error_out;
 
        dazukofs_event_cachep =
                kmem_cache_create("dazukofs_event_cache",
                                  sizeof(struct dazukofs_event), 0,
-                                 SLAB_HWCACHE_ALIGN, NULL);
+                                 SLAB_HWCACHE_ALIGN, NULL, NULL);
        if (!dazukofs_event_cachep)
                goto error_out;
 
        return 0;
 
 error_out:
-       if (!dazukofs_group_cachep)
+       if (dazukofs_group_cachep)
                kmem_cache_destroy(dazukofs_group_cachep);
-       if (!dazukofs_event_container_cachep)
+       if (dazukofs_event_container_cachep)
                kmem_cache_destroy(dazukofs_event_container_cachep);
-       if (!dazukofs_event_cachep)
+       if (dazukofs_event_cachep)
                kmem_cache_destroy(dazukofs_event_cachep);
        return -ENOMEM;
 }
@@ -156,7 +155,7 @@ static int capture_group_count(int *cach
 static int get_group_count(void)
 {
        int cache = 0;
-       int ret = wait_event_freezable(__group_count_queue,
+       int ret = wait_event_interruptible(__group_count_queue,
                                       capture_group_count(&cache) == 0);
        if (ret == 0)
                ret = __group_count;
@@ -614,7 +613,7 @@ int dazukofs_check_access(struct dentry 
        put_group_count();
 
        /* wait until event completely processed or signal */
-       err = wait_event_freezable(evt->queue, event_assigned(evt) == 0);
+       err = wait_event_interruptible(evt->queue, event_assigned(evt) == 0);
        if (err) {
                /* signal received */
                release_event(evt, 0, 0);
@@ -737,7 +736,8 @@ static int dazukofs_claim_event(struct d
 
        down(&work_mutex);
        if (!list_empty(&grp->todo_list.list)) {
-               ec = list_first_entry(&grp->todo_list.list,
+               struct list_head *head = &grp->todo_list.list;
+               ec = list_entry(head->next,
                                      struct dazukofs_event_container, list);
                list_del(&ec->list);
        } else {
@@ -818,9 +818,9 @@ int dazukofs_get_event(unsigned long gro
        }
 
        while (1) {
-               ret = wait_event_freezable(grp->queue,
-                                          is_event_available(grp) ||
-                                          grp->deprecated);
+               ret = wait_event_interruptible(grp->queue,
+                                              is_event_available(grp) ||
+                                              grp->deprecated);
                if (ret != 0)
                        break;
 
diff -rup dazukofs-3.0.0-rc3/file.c dazukofs-3.0.0-rc3-2.6.18MOD/file.c
--- dazukofs-3.0.0-rc3/file.c   2008-10-09 21:35:26.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/file.c 2008-11-28 09:47:29.000000000 +0100
@@ -25,7 +25,6 @@
 #include <linux/fs.h>
 #include <linux/mount.h>
 #include <linux/file.h>
-#include <linux/fs_stack.h>
 #include "dazukofs_fs.h"
 
 extern struct kmem_cache *dazukofs_file_info_cachep;
@@ -233,27 +232,33 @@ static int dazukofs_open(struct inode *i
        struct dentry *lower_dentry = dget(GET_LOWER_DENTRY(dentry));
        struct vfsmount *lower_mnt = mntget(GET_LOWER_MNT(dentry));
        struct file *lower_file;
-       int err = 0;
+       int err;
 
        err = dazukofs_check_access(file->f_dentry, file->f_vfsmnt);
        if (err)
-               goto out;
+               goto out_put;
 
        SET_FILE_INFO(file, kmem_cache_zalloc(dazukofs_file_info_cachep,
                      GFP_KERNEL));
        if (!GET_FILE_INFO(file)) {
                err = -ENOMEM;
-               goto out;
+               goto out_put;
        }
 
        lower_file = dentry_open(lower_dentry, lower_mnt, file->f_flags);
        if (IS_ERR(lower_file)) {
+               /* dput() and mntput() already done by dentry_open() */
                err = PTR_ERR(lower_file);
-               goto out;
+               goto out_err;
        }
 
        SET_LOWER_FILE(file, lower_file);
-out:
+
+       return 0;
+out_put:
+       mntput(lower_mnt);
+       dput(lower_dentry);
+out_err:
        return err;
 }
 
Nur in dazukofs-3.0.0-rc3-2.6.18MOD/: .file.c.swp.
diff -rup dazukofs-3.0.0-rc3/group_dev.c 
dazukofs-3.0.0-rc3-2.6.18MOD/group_dev.c
--- dazukofs-3.0.0-rc3/group_dev.c      2008-10-25 00:58:17.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/group_dev.c    2008-11-28 10:06:35.000000000 
+0100
@@ -191,10 +191,8 @@ int dazukofs_group_dev_init(int dev_majo
                            struct class *dazukofs_class)
 {
        int err = 0;
-       struct device *dev;
        int i;
        int cdev_count;
-       int dev_minor_end = dev_minor_start;
 
        /* setup cdevs for groups */
        for (cdev_count = 0; cdev_count < GROUP_COUNT; cdev_count++) {
@@ -206,24 +204,8 @@ int dazukofs_group_dev_init(int dev_majo
                if (err)
                        goto error_out1;
        }
+       return dev_minor_start + GROUP_COUNT;
 
-       /* create group devices */
-       for (i = 0; i < GROUP_COUNT; i++) {
-               dev = device_create(dazukofs_class, NULL,
-                                   MKDEV(dev_major, dev_minor_end), NULL,
-                                   "%s.%d", DEVICE_NAME, i);
-               if (IS_ERR(dev)) {
-                       err = PTR_ERR(dev);
-                       goto error_out2;
-               }
-               dev_minor_end++;
-       }
-
-       return dev_minor_end;
-
-error_out2:
-       for (i = dev_minor_start; i < dev_minor_end; i++)
-               device_destroy(dazukofs_class, MKDEV(dev_major, i));
 error_out1:
        for (i = 0; i < cdev_count; i++)
                cdev_del(&groups_cdev[i]);
@@ -235,10 +217,6 @@ void dazukofs_group_dev_destroy(int dev_
                                struct class *dazukofs_class)
 {
        int i;
-
-       for (i = dev_minor_start; i < dev_minor_end; i++)
-               device_destroy(dazukofs_class, MKDEV(dev_major, i));
-
        for (i = 0; i < GROUP_COUNT; i++)
                cdev_del(&groups_cdev[i]);
 }
diff -rup dazukofs-3.0.0-rc3/ign_dev.c dazukofs-3.0.0-rc3-2.6.18MOD/ign_dev.c
--- dazukofs-3.0.0-rc3/ign_dev.c        2008-10-25 00:58:32.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/ign_dev.c      2008-11-28 10:08:53.000000000 
+0100
@@ -137,12 +137,14 @@ int dazukofs_ign_dev_init(int dev_major,
                          struct class *dazukofs_class)
 {
        int err = 0;
-       struct device *dev;
 
        INIT_LIST_HEAD(&ign_list.list);
        init_MUTEX(&ign_list_mutex);
 
-       dazukofs_ign_cachep = kmem_cache_create("dazukofs_ign_cache", 
sizeof(struct dazukofs_proc), 0, SLAB_HWCACHE_ALIGN, NULL);
+       dazukofs_ign_cachep = kmem_cache_create("dazukofs_ign_cache", 
+                                               sizeof(struct dazukofs_proc), 
+                                               0, SLAB_HWCACHE_ALIGN, NULL, 
+                                               NULL);
        if (!dazukofs_ign_cachep) {
                err = -ENOMEM;
                goto error_out1;
@@ -155,18 +157,8 @@ int dazukofs_ign_dev_init(int dev_major,
        if (err)
                goto error_out2;
 
-       /* create ignore device */
-       dev = device_create(dazukofs_class, NULL, MKDEV(dev_major, dev_minor),
-                           NULL, "%s.ign", DEVICE_NAME);
-       if (IS_ERR(dev)) {
-               err = PTR_ERR(dev);
-               goto error_out3;
-       }
-
        return 0;
 
-error_out3:
-       cdev_del(&ign_cdev);
 error_out2:
        dazukofs_destroy_ignlist();
        kmem_cache_destroy(dazukofs_ign_cachep);
@@ -177,7 +169,6 @@ error_out1:
 void dazukofs_ign_dev_destroy(int dev_major, int dev_minor,
                              struct class *dazukofs_class)
 {
-       device_destroy(dazukofs_class, MKDEV(dev_major, dev_minor));
        cdev_del(&ign_cdev);
        dazukofs_destroy_ignlist();
        kmem_cache_destroy(dazukofs_ign_cachep);
diff -rup dazukofs-3.0.0-rc3/inode.c dazukofs-3.0.0-rc3-2.6.18MOD/inode.c
--- dazukofs-3.0.0-rc3/inode.c  2008-10-25 00:58:45.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/inode.c        2008-11-28 09:47:29.000000000 
+0100
@@ -26,7 +26,6 @@
 #include <linux/namei.h>
 #include <linux/mount.h>
 #include <linux/uaccess.h>
-#include <linux/fs_stack.h>
 #include "dazukofs_fs.h"
 
 extern struct kmem_cache *dazukofs_dentry_info_cachep;
@@ -39,6 +38,15 @@ static struct inode_operations dazukofs_
 static struct inode_operations dazukofs_dir_iops;
 static struct inode_operations dazukofs_main_iops;
 
+
+void fsstack_copy_inode_size(struct inode *dst, const struct inode *src)
+{
+       mutex_lock(&dst->i_mutex);
+       i_size_write(dst, i_size_read((struct inode *) src));
+       mutex_unlock(&dst->i_mutex);
+       dst->i_blocks = src->i_blocks;
+}
+
 /**
  * dazukofs_inode_test - do something.
  * @inode: is something.
@@ -171,7 +179,7 @@ int dazukofs_interpose(struct dentry *lo
        else
                d_instantiate(dentry, inode);
 
-       fsstack_copy_attr_all(inode, lower_inode, NULL);
+       fsstack_copy_attr_all(inode, lower_inode);
        fsstack_copy_inode_size(inode, lower_inode);
 out:
        return err;
@@ -381,19 +389,19 @@ static int dazukofs_create(struct inode 
        mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
                          I_MUTEX_PARENT);
 
-       vfsmount_save = nd->path.mnt;
-       dentry_save = nd->path.dentry;
+       vfsmount_save = nd->mnt;
+       dentry_save = nd->dentry;
 
-       nd->path.mnt = mntget(lower_mnt);
-       nd->path.dentry = dget(lower_dentry);
+       nd->mnt = mntget(lower_mnt);
+       nd->dentry = dget(lower_dentry);
 
        err = vfs_create(lower_dentry_parent_inode, lower_dentry, mode, nd);
 
        mntput(lower_mnt);
        dput(lower_dentry);
 
-       nd->path.mnt = vfsmount_save;
-       nd->path.dentry = dentry_save;
+       nd->mnt = vfsmount_save;
+       nd->dentry = dentry_save;
 
        if (err)
                goto out;
@@ -436,7 +444,8 @@ static int dazukofs_symlink(struct inode
        mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
                          I_MUTEX_PARENT);
 
-       err = vfs_symlink(lower_dentry_parent_inode, lower_dentry, symname);
+       err = vfs_symlink(lower_dentry_parent_inode, lower_dentry, symname,
+                         S_IALLUGO);
        if (err)
                goto out;
 
@@ -581,9 +590,37 @@ static void dazukofs_put_link(struct den
  *
  * Returns some result.
  */
-static int dazukofs_permission(struct inode *inode, int mask)
+static int dazukofs_permission(struct inode *inode, int mask,
+                              struct nameidata *nd)
 {
-       return inode_permission(GET_LOWER_INODE(inode), mask);
+       struct vfsmount *lower_mnt = NULL;
+       struct dentry *lower_dentry = NULL;
+       struct vfsmount *vfsmnt_save = NULL;
+       struct dentry *dentry_save = NULL;
+       int err;
+
+       if (nd) {
+               lower_mnt = GET_LOWER_MNT(nd->dentry);
+               lower_dentry = GET_LOWER_DENTRY(nd->dentry);
+
+               vfsmnt_save = nd->mnt;
+               dentry_save = nd->dentry;
+
+               nd->mnt = mntget(lower_mnt);
+               nd->dentry = dget(lower_dentry);
+       }
+
+       err = permission(GET_LOWER_INODE(inode), mask, nd);
+
+       if (nd) {
+               mntput(lower_mnt);
+               dput(lower_dentry);
+
+               nd->mnt = vfsmnt_save;
+               nd->dentry = dentry_save;
+       }
+
+        return err;
 }
 
 /**
@@ -607,7 +644,7 @@ static int dazukofs_setattr(struct dentr
 
        err = notify_change(lower_dentry, ia);
 
-       fsstack_copy_attr_all(inode, lower_inode, NULL);
+       fsstack_copy_attr_all(inode, lower_inode);
        fsstack_copy_inode_size(inode, lower_inode);
 
        return err;
@@ -650,7 +687,7 @@ static int dazukofs_setxattr(struct dent
         err = lower_dentry_inode->i_op->setxattr(lower_dentry, name, value,
                                                 size, flags);
 
-       fsstack_copy_attr_all(dentry->d_inode, lower_dentry_inode, NULL);
+       fsstack_copy_attr_all(dentry->d_inode, lower_dentry_inode);
        fsstack_copy_inode_size(dentry->d_inode, lower_dentry_inode);
 out:
         return err;
@@ -933,10 +970,9 @@ static int dazukofs_rename(struct inode 
        if (err)
                goto out;
 
-       fsstack_copy_attr_all(new_dir, lower_new_dentry_parent_inode, NULL);
+       fsstack_copy_attr_all(new_dir, lower_new_dentry_parent_inode);
        if (new_dir != old_dir)
-               fsstack_copy_attr_all(old_dir, lower_old_dentry_parent_inode,
-                                     NULL);
+               fsstack_copy_attr_all(old_dir, lower_old_dentry_parent_inode);
 out:
        dput(lower_old_dentry_parent);
        dput(lower_new_dentry_parent);
diff -rup dazukofs-3.0.0-rc3/Makefile dazukofs-3.0.0-rc3-2.6.18MOD/Makefile
--- dazukofs-3.0.0-rc3/Makefile 2008-10-09 21:28:12.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/Makefile       2008-11-28 09:47:29.000000000 
+0100
@@ -5,7 +5,7 @@
 DAZUKOFS_KERNEL_SRC     = /lib/modules/`uname -r`/build
 DAZUKOFS_KERNEL_INSTALL = /lib/modules/`uname -r`/kernel/fs/dazukofs
 
-#EXTRA_CFLAGS += -DCONFIG_DAZUKOFS_IGNORE
+EXTRA_CFLAGS += -DCONFIG_DAZUKOFS_IGNORE
 
 obj-m += dazukofs.o
 
diff -rup dazukofs-3.0.0-rc3/super.c dazukofs-3.0.0-rc3-2.6.18MOD/super.c
--- dazukofs-3.0.0-rc3/super.c  2008-10-25 00:58:38.000000000 +0200
+++ dazukofs-3.0.0-rc3-2.6.18MOD/super.c        2008-11-28 09:47:29.000000000 
+0100
@@ -261,8 +261,8 @@ static int dazukofs_read_super(struct su
        if (err)
                return err;
 
-       lower_root = dget(nd.path.dentry);
-       lower_mnt = mntget(nd.path.mnt);
+       lower_root = dget(nd.dentry);
+       lower_mnt = mntget(nd.mnt);
 
        if (IS_ERR(lower_root)) {
                err = PTR_ERR(lower_root);
@@ -287,7 +287,7 @@ out_put:
        dput(lower_root);
        mntput(lower_mnt);
 out:
-       path_put(&nd.path);
+       path_release(&nd);
        return err;
 }
 
@@ -336,16 +336,17 @@ out:
 
 /**
  * init_once - do something.
- * @data: is something.
+ * @cachep: is something.
+ * @vptr: is something.
  *
  * Description: Does something.
  *
  * We do some stuff and then call the lower function version.
  */
-static void init_once(void *data)
+static void init_once(void *vptr, kmem_cache_t *cachep, unsigned long flags)
 {
        struct dazukofs_inode_info *inode_info =
-               (struct dazukofs_inode_info *)data;
+               (struct dazukofs_inode_info *)vptr;
 
        memset(inode_info, 0, sizeof(struct dazukofs_inode_info));
        inode_init_once(&(inode_info->vfs_inode));
@@ -396,7 +397,7 @@ static int init_caches(void)
                kmem_cache_create("dazukofs_inode_info_cache",
                                  sizeof(struct dazukofs_inode_info), 0,
                                  SLAB_HWCACHE_ALIGN,
-                                 init_once);
+                                 init_once, NULL);
        if (!dazukofs_inode_info_cachep)
                goto out_nomem;
 
@@ -404,7 +405,7 @@ static int init_caches(void)
                kmem_cache_create("dazukofs_sb_info_cache",
                                  sizeof(struct dazukofs_sb_info), 0,
                                  SLAB_HWCACHE_ALIGN,
-                                 NULL);
+                                 NULL, NULL);
        if (!dazukofs_sb_info_cachep)
                goto out_nomem;
 
@@ -412,7 +413,7 @@ static int init_caches(void)
                kmem_cache_create("dazukofs_dentry_info_cache",
                                  sizeof(struct dazukofs_dentry_info), 0,
                                  SLAB_HWCACHE_ALIGN,
-                                 NULL);
+                                 NULL, NULL);
        if (!dazukofs_dentry_info_cachep)
                goto out_nomem;
 
@@ -420,7 +421,7 @@ static int init_caches(void)
                kmem_cache_create("dazukofs_file_info_cache",
                                  sizeof(struct dazukofs_file_info), 0,
                                  SLAB_HWCACHE_ALIGN,
-                                 NULL);
+                                 NULL, NULL);
        if (!dazukofs_file_info_cachep)
                goto out_nomem;
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]