I had send inverse patch, correct path attached now
Excuse me.
diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/lookup.c unionfs.orig/build/lookup.c --- unionfs/build/lookup.c 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/lookup.c 2007-04-17 11:09:00.000000000 +0200 @@ -382,7 +382,7 @@ } /* The dentry cache is just so we have properly sized dentries. */ -static kmem_cache_t *unionfs_dentry_cachep; +static struct kmem_cache *unionfs_dentry_cachep; int init_dentry_cache(void) { unionfs_dentry_cachep = @@ -399,9 +399,10 @@ { if (!unionfs_dentry_cachep) return; - if (kmem_cache_destroy(unionfs_dentry_cachep)) + kmem_cache_destroy(unionfs_dentry_cachep); + /*if (kmem_cache_destroy(unionfs_dentry_cachep)) printk(KERN_ERR - "unionfs_dentry_cache: not all structures were freed\n"); + "unionfs_dentry_cache: not all structures were freed\n");*/ return; } @@ -420,7 +421,7 @@ spin_lock(&dentry->d_lock); if (!dtopd_nocheck(dentry)) { dtopd_lhs(dentry) = (struct unionfs_dentry_info *) - kmem_cache_alloc(unionfs_dentry_cachep, SLAB_ATOMIC); + kmem_cache_alloc(unionfs_dentry_cachep, GFP_ATOMIC); if (!dtopd_nocheck(dentry)) goto out; init_MUTEX_LOCKED(&dtopd_nocheck(dentry)->udi_sem); diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/rdstate.c unionfs.orig/build/rdstate.c --- unionfs/build/rdstate.c 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/rdstate.c 2007-04-17 10:42:50.000000000 +0200 @@ -26,11 +26,11 @@ /* There are two structures here, rdstate which is a hash table * of the second structure which is a filldir_node. */ -/* This is a kmem_cache_t for filldir nodes, because we allocate a lot of them +/* This is a kmem_cache for filldir nodes, because we allocate a lot of them * and they shouldn't waste memory. If the node has a small name (as defined * by the dentry structure), then we use an inline name to preserve kmalloc * space. */ -static kmem_cache_t *unionfs_filldir_cachep; +static struct kmem_cache *unionfs_filldir_cachep; int init_filldir_cache(void) { unionfs_filldir_cachep = @@ -47,10 +47,11 @@ { if (!unionfs_filldir_cachep) return; - if (kmem_cache_destroy(unionfs_filldir_cachep)) { + kmem_cache_destroy(unionfs_filldir_cachep); + /*if (kmem_cache_destroy(unionfs_filldir_cachep)) { printk(KERN_ERR "unionfs_filldir_cache: not all structures were freed\n"); - } + }*/ return; } @@ -253,7 +254,7 @@ newnode = (struct filldir_node *)kmem_cache_alloc(unionfs_filldir_cachep, - SLAB_KERNEL); + GFP_KERNEL); if (!newnode) goto out; diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/sioq.c unionfs.orig/build/sioq.c --- unionfs/build/sioq.c 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/sioq.c 2007-04-17 11:10:04.000000000 +0200 @@ -41,67 +41,68 @@ destroy_workqueue(sioq); } -void run_sioq(void (*func)(void *arg), struct sioq_args *args) +void run_sioq(work_func_t func, struct sioq_args *args) { - DECLARE_WORK(wk, func, &args->comp); + /*DECLARE_WORK(wk, func, &args->comp);*/ + INIT_WORK(&args->tqueue, func); init_completion(&args->comp); - while (!queue_work(sioq, &wk)) { + while (!queue_work(sioq, &args->tqueue)) { // TODO: do accounting if needed schedule(); } wait_for_completion(&args->comp); } -void __unionfs_create(void *data) +void __unionfs_create(struct work_struct *work) { - struct sioq_args *args = data; + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); struct create_args *c = &args->create; args->err = vfs_create(c->parent, c->dentry, c->mode, c->nd); complete(&args->comp); } -void __unionfs_mkdir(void *data) +void __unionfs_mkdir(struct work_struct *work) { - struct sioq_args *args = data; + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); struct mkdir_args *m = &args->mkdir; args->err = vfs_mkdir(m->parent, m->dentry, m->mode); complete(&args->comp); } -void __unionfs_mknod(void *data) +void __unionfs_mknod(struct work_struct *work) { - struct sioq_args *args = data; + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); struct mknod_args *m = &args->mknod; args->err = vfs_mknod(m->parent, m->dentry, m->mode, m->dev); complete(&args->comp); } -void __unionfs_symlink(void *data) +void __unionfs_symlink(struct work_struct *work) { - struct sioq_args *args = data; + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); struct symlink_args *s = &args->symlink; args->err = vfs_symlink(s->parent, s->dentry, s->symbuf, s->mode); complete(&args->comp); } -void __unionfs_unlink(void *data) +void __unionfs_unlink(struct work_struct *work) { - struct sioq_args *args = data; + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); struct unlink_args *u = &args->unlink; args->err = vfs_unlink(u->parent, u->dentry); complete(&args->comp); } -void __delete_whiteouts(void *data) { - struct sioq_args *args = data; +void __delete_whiteouts(struct work_struct *work) { + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); struct deletewh_args *d = &args->deletewh; args->err = delete_whiteouts(d->dentry, d->bindex, d->namelist); complete(&args->comp); } -void __is_opaque_dir(void *data) +void __is_opaque_dir(struct work_struct *work) { - struct sioq_args *args = data; + struct sioq_args *args = container_of(work, struct sioq_args, tqueue); args->ret = lookup_one_len(UNIONFS_DIR_OPAQUE, args->isopaque.dentry, sizeof(UNIONFS_DIR_OPAQUE) - 1); diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/sioq.h unionfs.orig/build/sioq.h --- unionfs/build/sioq.h 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/sioq.h 2007-04-17 11:07:54.000000000 +0200 @@ -50,6 +50,8 @@ int err; void *ret; + struct work_struct tqueue; + union { struct deletewh_args deletewh; struct isopaque_args isopaque; @@ -64,16 +66,16 @@ extern struct workqueue_struct *sioq; int __init init_sioq(void); extern void fin_sioq(void); -extern void run_sioq(void (*func)(void *arg), struct sioq_args *args); +extern void run_sioq(work_func_t func, struct sioq_args *args); /* Extern definitions for our privledge escalation helpers */ -extern void __unionfs_create(void *data); -extern void __unionfs_mkdir(void *data); -extern void __unionfs_mknod(void *data); -extern void __unionfs_symlink(void *data); -extern void __unionfs_unlink(void *data); -extern void __delete_whiteouts(void *data); -extern void __is_opaque_dir(void *data); +extern void __unionfs_create(struct work_struct *work); +extern void __unionfs_mkdir(struct work_struct *work); +extern void __unionfs_mknod(struct work_struct *work); +extern void __unionfs_symlink(struct work_struct *work); +extern void __unionfs_unlink(struct work_struct *work); +extern void __delete_whiteouts(struct work_struct *work); +extern void __is_opaque_dir(struct work_struct *work); #endif /* _SIOQ_H */ diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/stale_inode.c unionfs.orig/build/stale_inode.c --- unionfs/build/stale_inode.c 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/stale_inode.c 2007-04-17 10:28:04.000000000 +0200 @@ -10,7 +10,7 @@ * $Id: stale_inode.c,v 1.13 2006/03/21 09:22:11 jsipek Exp $ */ -#include <linux/config.h> +/*#include <linux/config.h>*/ #include <linux/version.h> #include <linux/fs.h> diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/super.c unionfs.orig/build/super.c --- unionfs/build/super.c 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/super.c 2007-04-17 10:41:48.000000000 +0200 @@ -24,7 +24,7 @@ /* The inode cache is used with alloc_inode for both our inode info and the * vfs inode. */ -static kmem_cache_t *unionfs_inode_cachep; +static struct kmem_cache *unionfs_inode_cachep; static void unionfs_read_inode(struct inode *inode) { @@ -326,7 +326,7 @@ print_entry_location(); c = (struct unionfs_inode_container *) - kmem_cache_alloc(unionfs_inode_cachep, SLAB_KERNEL); + kmem_cache_alloc(unionfs_inode_cachep, GFP_KERNEL); if (!c) { print_exit_pointer(NULL); return NULL; @@ -346,7 +346,7 @@ print_exit_location(); } -static void init_once(void *v, kmem_cache_t * cachep, unsigned long flags) +static void init_once(void *v, struct kmem_cache * cachep, unsigned long flags) { struct unionfs_inode_container *c = (struct unionfs_inode_container *)v; @@ -380,9 +380,10 @@ print_entry_location(); if (!unionfs_inode_cachep) goto out; - if (kmem_cache_destroy(unionfs_inode_cachep)) + kmem_cache_destroy(unionfs_inode_cachep); + /*if (kmem_cache_destroy(unionfs_inode_cachep)) printk(KERN_ERR - "unionfs_inode_cache: not all structures were freed\n"); + "unionfs_inode_cache: not all structures were freed\n");*/ out: print_exit_location(); return; diff -ur -x Module.symvers -x control.backup -x fistdev.mk -x Makefile -x control unionfs/build/unionfs.h unionfs.orig/build/unionfs.h --- unionfs/build/unionfs.h 2007-01-29 00:55:07.000000000 +0100 +++ unionfs.orig/build/unionfs.h 2007-04-17 10:27:57.000000000 +0200 @@ -3,7 +3,7 @@ #ifdef __KERNEL__ -#include <linux/config.h> +/*#include <linux/config.h>*/ #include <linux/version.h> #include <linux/sched.h> #include <linux/kernel.h> @@ -517,7 +517,7 @@ dest->i_atime = src->i_atime; dest->i_mtime = src->i_mtime; dest->i_ctime = src->i_ctime; - dest->i_blksize = src->i_blksize; + /*dest->i_blksize = src->i_blksize;*/ dest->i_blkbits = src->i_blkbits; dest->i_size = src->i_size; dest->i_blocks = src->i_blocks;