Just wanted to share this with the general public.

diff --fast -Ndpru -x '*.cmd' unionfs-20060916_2203/commonfops.c 
unionfs-20060916_2203-2.6.17/commonfops.c
--- unionfs-20060916_2203/commonfops.c  2006-09-17 04:03:39.000000000 +0200
+++ unionfs-20060916_2203-2.6.17/commonfops.c   2006-09-26 13:46:51.815449000 
+0200
@@ -649,7 +649,7 @@ long unionfs_ioctl(struct file *file, un
        return err;
 }
 
-int unionfs_flush(struct file *file, fl_owner_t id)
+int unionfs_flush(struct file *file)
 {
        int err = 0;            /* assume ok (see open.c:close_fp) */
        struct file *hidden_file = NULL;
@@ -672,7 +672,7 @@ int unionfs_flush(struct file *file, fl_
 
                if (hidden_file && hidden_file->f_op
                    && hidden_file->f_op->flush) {
-                       err = hidden_file->f_op->flush(hidden_file, id);
+                       err = hidden_file->f_op->flush(hidden_file);
                        if (err)
                                goto out_lock;
                        /* This was earlier done in the unlink_all function in 
unlink.c */
diff --fast -Ndpru -x '*.cmd' unionfs-20060916_2203/main.c 
unionfs-20060916_2203-2.6.17/main.c
--- unionfs-20060916_2203/main.c        2006-09-17 04:03:39.000000000 +0200
+++ unionfs-20060916_2203-2.6.17/main.c 2006-09-26 13:47:49.945449000 +0200
@@ -768,11 +768,11 @@ static int unionfs_read_super(struct sup
        return err;
 }
 
-static int unionfs_get_sb(struct file_system_type *fs_type,
+static struct super_block *unionfs_get_sb(struct file_system_type *fs_type,
                          int flags, const char *dev_name,
-                         void *raw_data, struct vfsmount *mnt)
+                         void *raw_data)
 {
-       return get_sb_nodev(fs_type, flags, raw_data, unionfs_read_super, mnt);
+       return get_sb_nodev(fs_type, flags, raw_data, unionfs_read_super);
 }
 
 void unionfs_kill_block_super(struct super_block *sb)
diff --fast -Ndpru -x '*.cmd' unionfs-20060916_2203/super.c 
unionfs-20060916_2203-2.6.17/super.c
--- unionfs-20060916_2203/super.c       2006-09-17 04:03:39.000000000 +0200
+++ unionfs-20060916_2203-2.6.17/super.c        2006-09-26 13:50:29.665449000 
+0200
@@ -158,17 +158,15 @@ static void unionfs_put_super(struct sup
        print_exit_location();
 }
 
-static int unionfs_statfs(struct dentry *dentry, struct kstatfs *buf)
+static int unionfs_statfs(struct super_block *sb, struct kstatfs *buf)
 {
        int err = 0;
-       struct super_block *sb, *hidden_sb;
+       struct super_block *hidden_sb;
        struct kstatfs rsb;
        int bindex, bindex1, bstart, bend;
 
        print_entry_location();
 
-       sb = dentry->d_sb;
-
        memset(buf, 0, sizeof(struct kstatfs));
        buf->f_type = UNIONFS_SUPER_MAGIC;
 
@@ -193,7 +191,7 @@ static int unionfs_statfs(struct dentry 
                        continue;
                }
 
-               err = vfs_statfs(hidden_sb->s_root, &rsb);
+               err = vfs_statfs(hidden_sb, &rsb);
                dprint(PRINT_DEBUG,
                       "adding values for bindex:%d bsize:%d blocks:%d bfree:%d 
bavail:%d\n",
                       bindex, (int)rsb.f_bsize, (int)rsb.f_blocks,
@@ -421,22 +419,14 @@ static int unionfs_write_inode(struct in
  * left in the kernel after a user level file server (such as amd)
  * dies.
  */
-static void unionfs_umount_begin(struct vfsmount *mnt, int flags)
+static void unionfs_umount_begin(struct super_block *sb)
 {
-       struct super_block *sb, *hidden_sb;
+       struct super_block *hidden_sb;
        struct vfsmount *hidden_mnt;
        int bindex, bstart, bend;
 
        print_entry_location();
 
-       if (!(flags & MNT_FORCE))
-               /* we are not being MNT_FORCEd, therefore we should emulate old
-                * behaviour
-                */
-               goto out;
-
-       sb = mnt->mnt_sb;
-
        bstart = sbstart(sb);
        bend = sbend(sb);
        for (bindex = bstart; bindex <= bend; bindex++) {
@@ -445,10 +435,9 @@ static void unionfs_umount_begin(struct 
 
                if (hidden_mnt && hidden_sb && hidden_sb->s_op &&
                    hidden_sb->s_op->umount_begin)
-                       hidden_sb->s_op->umount_begin(hidden_mnt, flags);
+                       hidden_sb->s_op->umount_begin(hidden_sb);
        }
 
-out:
        print_exit_location();
 }
 
diff --fast -Ndpru -x '*.cmd' unionfs-20060916_2203/unionfs.h 
unionfs-20060916_2203-2.6.17/unionfs.h
--- unionfs-20060916_2203/unionfs.h     2006-09-17 04:03:39.000000000 +0200
+++ unionfs-20060916_2203-2.6.17/unionfs.h      2006-09-26 13:47:08.215449000 
+0200
@@ -45,14 +45,6 @@
 #include <linux/dcache.h>
 #include <linux/poll.h>
 
-#ifndef UNIONFS_UNSUPPORTED
-#if LINUX_VERSION_CODE != KERNEL_VERSION(SUP_MAJOR,SUP_MINOR,SUP_PATCH)
-#warning You are compiling Unionfs on an unsupported kernel version.
-#warning To compile Unionfs, you will need to define UNIONFS_UNSUPPORTED.
-#warning Try adding: EXTRACFLAGS=-DUNIONFS_UNSUPPORTED to fistdev.mk
-#endif
-#endif
-
 /* the file system name */
 #define UNIONFS_NAME "unionfs"
 
@@ -387,7 +379,7 @@ extern int unionfs_getlk(struct file *fi
 extern int unionfs_file_revalidate(struct file *file, int willwrite);
 extern int unionfs_open(struct inode *inode, struct file *file);
 extern int unionfs_file_release(struct inode *inode, struct file *file);
-extern int unionfs_flush(struct file *file, fl_owner_t id);
+extern int unionfs_flush(struct file *file);
 extern long unionfs_ioctl(struct file *file, unsigned int cmd,
                          unsigned long arg);
 
#<EOF>


Jan Engelhardt
-- 
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to