diff -urN unionfs-1.3/AUTHORS unionfs-20060811-0102/AUTHORS
--- unionfs-1.3/AUTHORS	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/AUTHORS	2006-08-11 07:02:57.000000000 +0200
@@ -104,7 +104,7 @@
 
 * Klaus Knopper <unionfs@knopper.net>
 August 22, 2005: Fix from lookup_one_len in unionfs_create.
-September 23, 2005: Fix for unionfs_permission pertaining to 
+September 23, 2005: Fix for unionfs_permission pertaining to
 read only file systems
 
 * Junjiro Okajima <hooanon05@yahoo.co.jp>
@@ -141,7 +141,7 @@
 April 17, 2006: Fixed link-unlink issue (i_nlink going to 0)
 
 * Bill Nottingham <notting@redhat.com>
-Match 3, 2006: Fixed tmpfs xattrs	
+Match 3, 2006: Fixed tmpfs xattrs
 
 * Robert Glowczynski <roglo@op.pl>
 October 6, 2005: Fix for fsync over squashfs.
@@ -176,5 +176,5 @@
 
 * Gregory Haskins <ghaskins@novell.com>
 June 14, 2006: Updated RPM specfile, fixed up Makefiles
- 
+
 * And many more ...
diff -urN unionfs-1.3/ChangeLog unionfs-20060811-0102/ChangeLog
--- unionfs-1.3/ChangeLog	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/ChangeLog	2006-08-11 07:02:57.000000000 +0200
@@ -1,3 +1,50 @@
+2006-08-05  Junjiro Okajima  <hooanon05@yahoo.co.jp>
+
+	* ALL: Copyright header update (fixed my name - added 'Jeff', added
+	  Junjiro, super.c had 2 ezk lines) (a part of LKML-branch)
+
+2006-07-31  David P. Quigley  <dpquigl@fsl.cs.sunysb.edu>
+
+	* main.c: Fixed a printk statement.
+
+2006-07-31  David P. Quigley  <dpquigl@fsl.cs.sunysb.edu>
+
+	* main.c: Added a new mount option to specify the directory 
+	specifier for the dirs= section of the unionfs mount command
+	* man/unionfs.4: Added separator documentation
+
+2006-07-19  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
+
+	* subr.c: Removed references to tasklist_lock since it will
+	be removed from 2.6.18 and is not needed.
+
+2006-07-13  Erez Zadok  <ezk@cs.sunysb.edu>
+
+	* INSTALL (UNIONFS_IMAP): rephrase.
+
+2006-07-07  David P. Quigley  <dpquigl@tycho.nsa.gov>
+
+	* Makefile: Cleanedup install and uninstall targets.
+
+2006-07-03  David P. Quigley  <dpquigl@tycho.nsa.gov>
+
+	* copyup.c (copyup_xattrs): removed LSM hooks in function. They
+	are not needed since the only time we access xattrs are with the
+	vfs_*xattr functions which already have the checks. In addition
+	replaced makeshift setxattr code with appropriate vfs_setxattr
+	call.
+
+2006-06-29  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
+
+	* misc/runtests.sh: Fixed inverted logic condition
+
+	* misc/runtests.sh: If build fails, provide an fallback option
+
+2006-06-29  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
+
+	* Makefile, Makefile.kernel, commonfops.c, main.c, super.c,
+	unionfs.h: Updated to make 2.6.18-rc happy.
+
 2006-06-26  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* NEWS: Unionfs 1.3, copied over 1.1.5 release news
@@ -10,15 +57,15 @@
 
 2006-06-22  Junjiro Okajima  <hooanon05@yahoo.co.jp>
 
-	* persistent_inode.c: fix tiny bugs in __write_uin() and read_uin(),
-	  use __fread() in get_lin().
-	* super.c: new export functions. un-tested 64 bit environment (pointer
-	  and inode number).
+	* persistent_inode.c: fix tiny bugs in __write_uin() and
+	  read_uin(), use __fread() in get_lin().
+	* super.c: new export functions. un-tested 64 bit environment
+	  (pointer and inode number).
 
 2006-06-14  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
-	* man/uniondbg.8, man/unionimap.8: newline after .IP "-foo" to make
-	man happy
+	* man/uniondbg.8, man/unionimap.8: newline after .IP "-foo" to
+	make man happy
 
 2006-06-14  Gregory Haskins  <ghaskins@novell.com>
 
@@ -98,10 +145,10 @@
 2006-05-31  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* .cvsignore: ignore vi/vim swap files
-	
+
 	* match-dget.pl, match-iget.pl, match-malloc.pl, misc/match-dget.pl,
 	misc/match-iget.pl, misc/match-malloc.pl: Moved debug scripts to misc/
-	
+
 
 2006-05-31  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
@@ -119,7 +166,7 @@
 
 	* utils/Makefile: Removed some variable declarations
 	* Makefile: Passed variables down to lower file
-	
+
 2006-05-30  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
 	* utils/: Moved all user mode programs into this directory
@@ -148,7 +195,7 @@
 	* mmap.c (sync_page, unionfs_sync_page): Merged the two functions,
 	since (1) sync_page might be confused with kernel's own sync_page,
 	and (2) our sync_page did not do much beside an if and a function call
-	
+
 2006-05-30  Junjiro Okajima  <hooanon05@yahoo.co.jp>
 
 	* regression/rename-501.sh: remove obsoleted debug lines.
@@ -181,14 +228,14 @@
 2006-05-25  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* copyup.c (copyup_named_dentry): Removed several hard-coded values
-	
+
 	* main.c: same as above
-	
+
 	* mmap.c (unionfs_do_readpage): same as above
-	
+
 	* print.c (fist_print_inode, fist_print_file, __fist_print_dentry):
 	same as above
-	
+
 	* unionimap.c (create_forwardmap, check_if_entry_exists,
 	print_forwardmap): same as above
 
@@ -203,7 +250,7 @@
 
 	* misc/nightly-build.sh: Make /cvs/cvsupdate after we have
 	successfully updated and re-exec-ed the script
-	
+
 2006-05-24  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* misc/nightly-build.sh: Make kernel build on 2 CPUs
@@ -219,7 +266,7 @@
 
 	* inode.c (unionfs_mkdir): __dir_opaque whiteouts' creation mode
 	should not be hardcoded to an octal value
-	
+
 	* mmap.c (unionfs_sync_page): Removed leftover line of code
 
 2006-05-22  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
@@ -312,7 +359,7 @@
 	* copyup.c (copyup_xattr): Fixed xattr "not supported" check
 
 2006-03-07  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
-	
+
 	* misc/preprocess.pl: added UNIONFS_MMAP to list of symbols.
 
 2006-03-07  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
@@ -322,7 +369,7 @@
 
 2006-03-07  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
-	* file.c (__unionfs_read, __unionfs_write): code that was removed 
+	* file.c (__unionfs_read, __unionfs_write): code that was removed
 	by Shaya's patch which we fall back on if the person chooses not to
 	compile with UNIONFS_MMAP
 	* copyup.c, file.c, inode.c, main.c, super.c: Ifdefed around Shaya's
@@ -354,11 +401,11 @@
 2006-03-03  Bill Nottingham <notting@redhat.com>
 
 	* unionfs.h: added extern for temp vfs_listxattr function
-	* copyup.c: removed old style listxattr code and replaced 
+	* copyup.c: removed old style listxattr code and replaced
 	it with vfs_listxattr
 	* xattr.c: removed locks from all xattr functions since kernel
 	documentation says that getxattr and listxattr don't require
-	a lock and since vfs_setxattr and vfs_removexattr take the 
+	a lock and since vfs_setxattr and vfs_removexattr take the
 	mutex on the inode we get a deadlock if we lock the inode
 	before hand.
 
@@ -369,14 +416,14 @@
 2006-02-21  Junjiro Okajima  <hooanon05@yahoo.co.jp>
 
 	* dirhelper.c (delete_whiteouts): Use superio_*; small cleanup
-	
+
 	* lookup.c (is_opaque_dir): Use superio_*
-	
+
 	* subr.c (superio_store, superio_revert): Added superio_store and
 	superio_revert
-	
+
 	* unionfs.h: Added struct superio
-	
+
 	* unlink.c (unionfs_rmdir_all): Check return value of delete_whiteouts
 
 2006-02-20  Charles P. Wright  <cwright@fsl.cs.sunysb.edu>
@@ -402,7 +449,7 @@
 2006-02-15  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* main.c (unionfs_read_super, unionfs_d_alloc_root): Created a "fake"
-	d_alloc_root 
+	d_alloc_root
 
 2006-02-15  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
@@ -424,7 +471,7 @@
 	persistent_inode.c, super.c, unionfs.h, unionfs_debugmacros.h:
 	Removed inline objects from unionfs_inode_info, unionfs_dentry_info,
 	unionfs_sb_info, and unionfs_file_info
-	
+
 	* unionfs_macros.h: Removed inline objects from unionfs_inode_info,
 	unionfs_dentry_info, unionfs_sb_info, and unionfs_file_info; Replaced
 	many macros by inline functions
@@ -467,7 +514,7 @@
 	* unionfs.h (unionfs_sb_info): same as above.
 
 2006-02-07  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
-	
+
 	* INSTALL: Added fistdev.mk description for UNIONFS_IMAP.
 
 2006-02-07  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
@@ -480,7 +527,7 @@
 	* super.c (unionfs_put_super): Same as two lines up.
 	* unionfs.h: ifdefed persistent inode variables from unionfs_sb_info
 	and the externed functions.
-	
+
 
 2006-02-05  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
@@ -514,7 +561,7 @@
 	distinguish the error from success. Writing persistent ino files
 	may meet the file size limit. Now, users should be careful about
 	filesystem quota.
-	
+
 	* main.c (unionfs_interpose): See above
 
 	* persistent_inode.c (__fread, __fwrite, parse_imap_option, __get_uid,
@@ -534,7 +581,7 @@
 2006-02-04  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
 	* debug_malloc.c: Moved all malloc debugging functions to this file.
-	
+
 	* Makefile: added debug_malloc.o to object list.
 
 	* persistent_inode.c (remove_map): removed a decrement that wasent
@@ -552,9 +599,9 @@
 
 2006-02-01  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
-	* unionfs.h: Removed usi_fsnum_table since its not used and makes 
+	* unionfs.h: Removed usi_fsnum_table since its not used and makes
 	no sense to have.
-	
+
 	* persistent_inode.c: Removed usi_fsnum_table code. Added remove_map
 
 	* unionimap.c: Fixed code that prints forward maps since it was always
@@ -574,7 +621,7 @@
 2006-01-25  Amnon Aaronsohn  <bla@cs.huji.ac.il>
 
 	* patch-kernel.sh: Fixed patch-kernel.sh error msg
-	
+
 2006-01-24  Junjiro Okajima  <hooanon05@yahoo.co.jp>
 
 	* subr.c (create_whiteout_parent): Hidden inode is not iput() since
@@ -584,7 +631,7 @@
 
 	* copyup.c (copyup_named_dentry, create_parents_named): Fixed
 	persistant inode code: link, rmdir, shrinking of dcache, map validation
-	
+
 	* main.c (copyup_xattrs): Fixed persistant inode code: link, rmdir,
 	shrinking of dcache, map validation
 
@@ -599,41 +646,41 @@
 2006-01-20  Martin Kreiner  <m.kreiner@levigo.de>
 
 	* BUGS, INSTALL, man/unionctl.8, man/unionfs.4: Documentation update
-	
+
 	* branchman.c (unionfs_ioctl_addbranch, unionfs_ioctl_rdwrbranch):
 	Per branch nfsro option
-	
+
 	* inode.c (inode_permission): Per branch nfsro option
-	
+
 	* main.c (parse_dirs_option, unionfs_parse_options): Per branch nfsro
 	option
-	
+
 	* super.c (unionfs_show_options): Per branch nfsro option
-	
+
 	* unionctl.c (__usage, parse_rw, parse_options, dump_branches, main):
 	Per branch nfsro option
-	
+
 	* unionfs.h: Per branch nfsro option
 
 2006-01-20  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* branchman.c (unionfs_ioctl_addbranch, unionfs_ioctl_delbranch):
 	Inode refcount debugging tool calls
-	
+
 	* copyup.c (create_parents_named):Inode refcount debugging tool calls
-	
+
 	* dentry.c (unionfs_d_revalidate, unionfs_d_iput):Inode refcount
 	debugging tool calls
-	
+
 	* inode.c (unionfs_link): Inode refcount debugging tool calls
-	
+
 	* main.c (unionfs_interpose, unionfs_reinterpose, unionfs_igrab,
 	unionfs_iput, unionfs_iget): Inode refcount debugging helper code;
 	Fixed init of atomic_t
-	
+
 	* subr.c (create_whiteout_parent, unionfs_refresh_hidden_dentry):
 	Inode refcount debugging tool calls
-	
+
 	* super.c (unionfs_clear_inode): Inode refcount debugging tool calls
 
 	* unionfs.h: Definitions for IGET, IGRAB, and IPUT
@@ -643,7 +690,7 @@
 2006-01-17  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
 
 	* main.c, unionfs.h: Added #if'd kzalloc for kernels older than 2.6.14
-	
+
 2006-01-14  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
 	* branchman.c: Replaced pairs of KMALLOC and memset calls to
@@ -651,7 +698,7 @@
 
 	* commonfops.c: Replaced pairs of KMALLOC and memset calls to
 	KZALLOC calls.
- 
+
 	* copyup.c: Replaced pairs of KMALLOC and memset calls to
 	KZALLOC calls.
 
@@ -673,13 +720,13 @@
 	the non-existent kzmalloc
 
 2006-01-14  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
-	
+
 	* AUTHORS: added entry for Peeka J. Enberg
 
 2006-01-14  Peeka J. Enberg  <penberg@cs.helsinki.fi>
-	
+
 	* ALL: Changed all use of GFP_UNIONFS to GFP_KERNEL
-	
+
 	* unionfs.h: Removed definition for GFP_UNIONFS
 
 2006-01-14  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
@@ -687,12 +734,12 @@
 	* unionfs.h : Included defines for KZMALLOC and extern for
 	unionfs_kzalloc. NOTE: This change makes the minimum kernel
 	version for unionfs 2.6.14.
-	
+
 	* main.c (unionfs_kmalloc): Changed prototype to use the
 	actual type of GFP_KERNEL instead of int and removed a
 	(void *) since the kernel coding conventions say that this
 	is not necessary.
-	
+
 	* main.c (unionfs_kzalloc): New wrapper function to track
 	kzallocs when debugging.
 
@@ -753,9 +800,9 @@
 	vfs_permission otherwise generic_permission
 
 2006-01-03  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
-	
+
 	* ChangeLog : fixed two gramatical errors in the changelog.
-	
+
 2006-01-03  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
 	* unionfs.h: Added a define for the first valid inode number so we
@@ -763,11 +810,11 @@
 
 	* super.c: added a call to cleanup_imap_data to properly free
 	resources on unmount.
-	
+
 	* persistent_inode.c: (imap_parse_options): cleanedup code,
 	(init_imap_data): new function (cleanup_imap_data): new
-	function. 
-	
+	function.
+
 	* unionimap.c : cleaned up some brackets from single line if
 	statements.
 
@@ -908,9 +955,9 @@
 
 	* unionctl.c : Fixed check to see if a branch was already in the union and
 	fixed --before and --after logic.
-	
+
 	* regression/branchman.sh: BUG370 will not work anymore due to code to avoid
-	duplicate branches being added. Need to reevaluate if it should be kept 
+	duplicate branches being added. Need to reevaluate if it should be kept
 	anymore.
 
 2005-12-27  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
@@ -957,7 +1004,7 @@
 2005-11-29  Arun M. Krishnakumar  <arunmk@fsl.cs.sunysb.edu>
 
 	* unionctl.c: Fixed branch addition with just branch (and
-	  neither mode nor before/after specified. 
+	  neither mode nor before/after specified.
 
 2005-11-29  Charles P. Wright  <cwright@fsl.cs.sunysb.edu>
 
@@ -1163,7 +1210,7 @@
 
 2005-10-13  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
-	* rmdir-all.sh: added test for bug 430. Not sure if 
+	* rmdir-all.sh: added test for bug 430. Not sure if
 	we are going to patch it yet but if we do the test
 	is there.
 	* regression/Makefile: added rmdircheckinode.c
@@ -1244,7 +1291,7 @@
 
 2005-09-18  David P. Quigley  <dquigley@fsl.cs.sunysb.edu>
 
-	* removed 2.4 code from copyup.c, dentry.c, dirfops.c 
+	* removed 2.4 code from copyup.c, dentry.c, dirfops.c
 	and file.c
 
 2005-09-18  Josef "Jeff" Sipek  <jsipek@fsl.cs.sunysb.edu>
diff -urN unionfs-1.3/INSTALL unionfs-20060811-0102/INSTALL
--- unionfs-1.3/INSTALL	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/INSTALL	2006-08-11 07:02:57.000000000 +0200
@@ -63,8 +63,15 @@
 			in /lib/modules/`uname -r`/kernel/fs.  With
 			MODPREFIX=/foo they end up in
 			/foo/lib/modules/`uname -r`/kernel/fs.
-UNIONFS_IMAP		Compiles in persistent inode code. Mount should fail
-			if you try to use the imap option without this.
+UNIONFS_IMAP		Compiles in persistent inode code.  Mounting will
+			fail if you try to use the imap option without this
+			compile option.  The imap option is important if you
+			export your unionfs mount via NFS, because NFS
+			(v2/v3 at least) expects inode numbers to be
+			persistent, whereas Unionfs by default uses dynamic
+			inode numbers which may change silently.  Without
+			this imap option, NFS clients may see many "stale
+			file handle" errors, among others.
 Define options summary:
 UNIONFS_DEBUG		Turn on debugging facility (increases code size).
 UNIONFS_UNSUPPORTED	Bypass kernel versions checks.
diff -urN unionfs-1.3/Makefile unionfs-20060811-0102/Makefile
--- unionfs-1.3/Makefile	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/Makefile	2006-08-11 07:02:57.000000000 +0200
@@ -9,10 +9,10 @@
 PREFIX   = /usr/local
 MANDIR   = ${PREFIX}/man
 MODPREFIX=
-VERSION  = 1.3
+VERSION=20060811-0102
 SUP_MAJOR= 2
 SUP_MINOR= 6
-SUP_PATCH= 17
+SUP_PATCH= 18
 SUP_EXTRA=
 TAROPTS = czvf
 COMPEXT = .gz
@@ -105,6 +105,8 @@
 uninstall:
 	rm ${MODPREFIX}/${MODDIR}/kernel/fs/unionfs.ko
 	-/sbin/depmod -a
+	rm /usr/include/unionfs.h
+	rm ${MANDIR}/man8/unionimap.8
 	rm ${MANDIR}/man8/unionctl.8
 	rm ${MANDIR}/man8/uniondbg.8
 	rm ${MANDIR}/man4/unionfs.4
diff -urN unionfs-1.3/Makefile.kernel unionfs-20060811-0102/Makefile.kernel
--- unionfs-1.3/Makefile.kernel	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/Makefile.kernel	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,7 @@
-UNIONFS_VERSION  = 1.3
+UNIONFS_VERSION=20060811-0102
 SUP_MAJOR= 2
 SUP_MINOR= 6
-SUP_PATCH= 17
+SUP_PATCH= 18
 
 EXTRA_CFLAGS+=-DUNIONFS_VERSION=\"${UNIONFS_VERSION}\" -DSUP_MAJOR=${SUP_MAJOR} -DSUP_MINOR=${SUP_MINOR} -DSUP_PATCH=${SUP_PATCH}
 
diff -urN unionfs-1.3/branchman.c unionfs-20060811-0102/branchman.c
--- unionfs-1.3/branchman.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/branchman.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
-/* 
+/*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: branchman.c,v 1.63 2006/06/02 03:29:26 dquigley Exp $
+ *  $Id: branchman.c,v 1.65 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
diff -urN unionfs-1.3/commonfops.c unionfs-20060811-0102/commonfops.c
--- unionfs-1.3/commonfops.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/commonfops.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: commonfops.c,v 1.59 2006/06/02 03:29:26 dquigley Exp $
+ *  $Id: commonfops.c,v 1.61 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -648,7 +649,7 @@
 	return err;
 }
 
-int unionfs_flush(struct file *file)
+int unionfs_flush(struct file *file, fl_owner_t id)
 {
 	int err = 0;		/* assume ok (see open.c:close_fp) */
 	struct file *hidden_file = NULL;
@@ -671,7 +672,7 @@
 
 		if (hidden_file && hidden_file->f_op
 		    && hidden_file->f_op->flush) {
-			err = hidden_file->f_op->flush(hidden_file);
+			err = hidden_file->f_op->flush(hidden_file, id);
 			if (err)
 				goto out_lock;
 			/* This was earlier done in the unlink_all function in unlink.c */
diff -urN unionfs-1.3/copyup.c unionfs-20060811-0102/copyup.c
--- unionfs-1.3/copyup.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/copyup.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: copyup.c,v 1.72 2006/06/01 03:11:02 jsipek Exp $
+ *  $Id: copyup.c,v 1.75 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -54,14 +55,11 @@
 	name_list_orig = name_list;
 	while (*name_list) {
 		ssize_t size;
+
+		//We need to lock here since vfs_getxattr doesn't lock for us.
 		mutex_lock(&old_hidden_dentry->d_inode->i_mutex);
-		err = security_inode_getxattr(old_hidden_dentry, name_list);
-		if (err)
-			size = err;
-		else
-			size =
-			    vfs_getxattr(old_hidden_dentry, name_list,
-					 attr_value, XATTR_SIZE_MAX);
+		size = vfs_getxattr(old_hidden_dentry, name_list,
+				    attr_value, XATTR_SIZE_MAX);
 		mutex_unlock(&old_hidden_dentry->d_inode->i_mutex);
 		if (size < 0) {
 			err = size;
@@ -72,25 +70,9 @@
 			err = -E2BIG;
 			goto out;
 		}
-
-		mutex_lock(&new_hidden_dentry->d_inode->i_mutex);
-
-		err =
-		    security_inode_setxattr(old_hidden_dentry, name_list,
-					    attr_value, size, 0);
-
-		if (!err) {
-			err =
-			    new_hidden_dentry->d_inode->i_op->
-			    setxattr(new_hidden_dentry, name_list, attr_value,
-				     size, 0);
-			if (!err)
-				security_inode_post_setxattr(old_hidden_dentry,
-							     name_list,
-							     attr_value, size,
-							     0);
-		}
-		mutex_unlock(&new_hidden_dentry->d_inode->i_mutex);
+		//We don't need to lock here since vfs_setxattr does it for us.
+		err = vfs_setxattr(new_hidden_dentry, name_list, attr_value,
+				   size, 0);
 
 		if (err < 0)
 			goto out;
@@ -359,7 +341,7 @@
 		 *
 		 * another posisble solution would be in the address op code
 		 * would be to check the "lower" page to see if its dirty,
-		 * and if it's dirty, use it directl 
+		 * and if it's dirty, use it directl
 		 */
 		if (!err) {
 			err =
diff -urN unionfs-1.3/dentry.c unionfs-20060811-0102/dentry.c
--- unionfs-1.3/dentry.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/dentry.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: dentry.c,v 1.76 2006/06/01 03:11:02 jsipek Exp $
+ *  $Id: dentry.c,v 1.77 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
diff -urN unionfs-1.3/dirfops.c unionfs-20060811-0102/dirfops.c
--- unionfs-1.3/dirfops.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/dirfops.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: dirfops.c,v 1.24 2006/06/01 03:11:02 jsipek Exp $
+ *  $Id: dirfops.c,v 1.25 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
diff -urN unionfs-1.3/dirhelper.c unionfs-20060811-0102/dirhelper.c
--- unionfs-1.3/dirhelper.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/dirhelper.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: dirhelper.c,v 1.29 2006/02/21 08:36:24 jsipek Exp $
+ *  $Id: dirhelper.c,v 1.30 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
diff -urN unionfs-1.3/file.c unionfs-20060811-0102/file.c
--- unionfs-1.3/file.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/file.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: file.c,v 1.141 2006/06/01 03:11:02 jsipek Exp $
+ *  $Id: file.c,v 1.143 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -118,7 +119,7 @@
 	return err;
 }
 
-/* SP: Sendfile code not updated, but should be able to use 
+/* SP: Sendfile code not updated, but should be able to use
  * generic_file_sendfile, as it would use readpage, which we now have */
 #ifdef SUPPORT_BROKEN_LOSETUP
 static ssize_t unionfs_sendfile(struct file *file, loff_t * ppos,
diff -urN unionfs-1.3/inode.c unionfs-20060811-0102/inode.c
--- unionfs-1.3/inode.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/inode.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: inode.c,v 1.271 2006/06/01 03:11:02 jsipek Exp $
+ *  $Id: inode.c,v 1.273 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -531,7 +532,7 @@
 			whiteout_unlinked = 1;
 		}
 	}
-	
+
 	for (bindex = bstart; bindex >= 0; bindex--) {
 		hidden_dentry = dtohd_index(dentry, bindex);
 		if (!hidden_dentry) {
@@ -564,7 +565,7 @@
 		} else {
 			int i;
 			int bend = dbend(dentry);
-			
+
 			for (i = bindex + 1; i < bend; i++) {
 				if (dtohd_index(dentry, i)) {
 					DPUT(dtohd_index(dentry, i));
@@ -830,7 +831,7 @@
 	} else {
 		retval = generic_permission(inode, submask, NULL);
 	}
-	
+
 	if (retval && retval != -EROFS) /* ignore EROFS */
 		return retval;
 
@@ -865,7 +866,7 @@
 		 */
 		if (!is_file && !S_ISDIR(hidden_inode->i_mode))
 			continue;
-		/* We use our own special version of permission, such that 
+		/* We use our own special version of permission, such that
 		 * only the first branch returns -EROFS. */
 		err = inode_permission(hidden_inode, mask, nd, bindex);
 		/* The permissions are an intersection of the overall directory
@@ -941,7 +942,7 @@
 		break;
 	}
 #ifdef UNIONFS_MMAP
-	/* 
+	/*
 	 * SP: notify_change will change the lower file's size,
 	 * but we need to truncate the page tables, so need to call
 	 * vmtruncate()
diff -urN unionfs-1.3/lookup.c unionfs-20060811-0102/lookup.c
--- unionfs-1.3/lookup.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/lookup.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: lookup.c,v 1.46 2006/06/01 03:11:03 jsipek Exp $
+ *  $Id: lookup.c,v 1.47 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
diff -urN unionfs-1.3/main.c unionfs-20060811-0102/main.c
--- unionfs-1.3/main.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/main.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: main.c,v 1.171 2006/06/25 23:57:43 jro Exp $
+ *  $Id: main.c,v 1.175 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -268,12 +269,40 @@
 
 	return perms;
 }
-
+static int get_separator_count(char *options, char *separator)
+{
+	char *token, *locopts, *locsep = NULL;
+	int count = 0;
+	/*
+	 * We copy options so we dont destroy our pointer for parsing
+	 */
+	if (separator == NULL) {
+		locsep = KMALLOC(2, GFP_KERNEL);
+		if (!locsep) {
+			count = -ENOMEM;
+			goto out;
+		}
+		strcpy(locsep, ":");
+	} else {
+		locsep = separator;
+	}
+	locopts = KMALLOC(strlen(options) + 1, GFP_KERNEL);
+	if (!locopts) {
+		count = -ENOMEM;
+		goto out;
+	}
+	strcpy(locopts, options);
+	while ((token = strsep(&locopts, locsep)) != NULL)
+		count++;
+      out:
+	KFREE(locopts);
+	return count;
+}
 static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info
-			     *hidden_root_info, char *options)
+			     *hidden_root_info, char *options, char *separator)
 {
 	struct nameidata nd;
-	char *name;
+	char *name, *locsep = NULL;
 	int err = 0;
 	int branches = 1;
 	int bindex = 0;
@@ -288,14 +317,20 @@
 		err = -EINVAL;
 		goto out;
 	}
-
-	/* Each colon means we have a separator, this is really just a rough
-	 * guess, since strsep will handle empty fields for us. */
-	for (i = 0; options[i]; i++) {
-		if (options[i] == ':')
-			branches++;
+	/*
+	 * Check to see if separator is specified otherwise use ':'
+	 */
+	if (separator == NULL) {
+		locsep = KMALLOC(2, GFP_KERNEL);
+		if (!locsep) {
+			err = -ENOMEM;
+			goto out;
+		}
+		strcpy(locsep, ":");
+	} else {
+		locsep = separator;
 	}
-
+	branches = get_separator_count(options, separator);
 	/* allocate space for underlying pointers to hidden dentry */
 	if (!(stopd(sb)->usi_data = alloc_new_data(branches))) {
 		err = -ENOMEM;
@@ -309,12 +344,11 @@
 
 	/* now parsing the string b1:b2=rw:b3=ro:b4 */
 	branches = 0;
-	while ((name = strsep(&options, ":")) != NULL) {
+	while ((name = strsep(&options, locsep)) != NULL) {
 		int perms;
 
 		if (!*name)
 			continue;
-
 		branches++;
 
 		/* strip off =rw or =ro if it is specified. */
@@ -402,6 +436,8 @@
 		hidden_root_info->udi_dentry = NULL;
 		stopd(sb)->usi_data = NULL;
 	}
+	if (!separator)
+		KFREE(locsep);
 	return err;
 }
 
@@ -417,9 +453,10 @@
 							 char *options)
 {
 	struct unionfs_dentry_info *hidden_root_info;
-	char *optname;
+	char *optname, *separator = NULL;
 	int err = 0;
 	int bindex;
+	int sepfound = 0;
 	int dirsfound = 0;
 #ifdef UNIONFS_IMAP
 	int imapfound = 0;
@@ -465,7 +502,9 @@
 				err = -EINVAL;
 				goto out_error;
 			}
-			err = parse_dirs_option(sb, hidden_root_info, optarg);
+			err =
+			    parse_dirs_option(sb, hidden_root_info, optarg,
+					      separator);
 			if (err)
 				goto out_error;
 			continue;
@@ -500,6 +539,23 @@
 			}
 			continue;
 		}
+
+		if (!strcmp("separator", optname)) {
+			if (dirsfound) {
+				printk(KERN_WARNING
+				       "unionfs: dirs= already parsed separator '%s' will have no effect\n",
+				       optarg);
+				continue;
+			}
+			sepfound = 1;
+			separator = KMALLOC(strlen(optarg) + 1, GFP_KERNEL);
+			if (!separator) {
+				err = -ENOMEM;
+				goto out_error;
+			}
+			strcpy(separator, optarg);
+			continue;
+		}
 		/* All of these options require an integer argument. */
 		intval = simple_strtoul(optarg, &endptr, 0);
 		if (*endptr) {
@@ -547,6 +603,7 @@
 	stopd(sb)->usi_data = NULL;
 
 	hidden_root_info = ERR_PTR(err);
+	KFREE(separator);
       out:
 	print_exit_location();
 	return hidden_root_info;
@@ -711,11 +768,11 @@
 	return err;
 }
 
-static struct super_block *unionfs_get_sb(struct file_system_type *fs_type,
-					  int flags, const char *dev_name,
-					  void *raw_data)
+static int unionfs_get_sb(struct file_system_type *fs_type,
+			  int flags, const char *dev_name,
+			  void *raw_data, struct vfsmount *mnt)
 {
-	return get_sb_nodev(fs_type, flags, raw_data, unionfs_read_super);
+	return get_sb_nodev(fs_type, flags, raw_data, unionfs_read_super, mnt);
 }
 
 void unionfs_kill_block_super(struct super_block *sb)
diff -urN unionfs-1.3/man/unionfs.4 unionfs-20060811-0102/man/unionfs.4
--- unionfs-1.3/man/unionfs.4	2006-06-26 21:46:45.000000000 +0200
+++ unionfs-20060811-0102/man/unionfs.4	2006-08-11 07:02:57.000000000 +0200
@@ -26,7 +26,7 @@
 
 .TP
 \fBdirs=\fP\fIbranch\fP[\fB=ro\fP|\fB=nfsro\fP|\fB=rw\fP][\fB:\fP...]\fP
-specifies a colon separated list of which directories compose the union.
+specifies a separated list of which directories compose the union.
 Directories that come earlier in the list have a higher precedence than those
 which come later. Additionally, read-only or read-write permissions of the
 branch can be specified by appending \fB=ro\fP or \fB=rw\fP (default) to
@@ -45,6 +45,18 @@
 \fBdirs=/writable_branch=rw:/read-only_branch=ro:/nfs-mounted_branch=nfsro\fP
 
 .TP
+\fBseparator=\fP\fI"token"\fP
+specifies the character(s) that you wish to use to separate directories in the dirs=
+option. By default a colon is used however you can specify any string that you wish 
+to use.
+
+Syntax:
+separator="token"
+
+Example:
+\fBseparator=":"\fP
+
+.TP
 The available \fIunion-options\fP for the mount command are:
 .TP
 .B debug=\fIn\fP
diff -urN unionfs-1.3/mmap.c unionfs-20060811-0102/mmap.c
--- unionfs-1.3/mmap.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/mmap.c	2006-08-11 07:02:57.000000000 +0200
@@ -9,7 +9,7 @@
  * fistgen sources INCLUDING sources generated by fistgen.
  */
 /*
- *  $Id: mmap.c,v 1.10 2006/05/30 20:25:08 jsipek Exp $
+ *  $Id: mmap.c,v 1.11 2006/07/08 17:58:31 ezk Exp $
  */
 
 #include "unionfs.h"
@@ -224,8 +224,8 @@
 	page_data = (char *)kmap(page);
 	lower_file->f_pos = (page->index << PAGE_CACHE_SHIFT) + from;
 
-	/* SP: I use vfs_write instead of copying page data and the 
-	 * prepare_write/commit_write combo because file system's like 
+	/* SP: I use vfs_write instead of copying page data and the
+	 * prepare_write/commit_write combo because file system's like
 	 * GFS/OCFS2 don't like things touching those directly,
 	 * calling the underlying write op, while a little bit slower, will
 	 * call all the FS specific code as well
diff -urN unionfs-1.3/persistent_inode.c unionfs-20060811-0102/persistent_inode.c
--- unionfs-1.3/persistent_inode.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/persistent_inode.c	2006-08-11 07:02:57.000000000 +0200
@@ -16,7 +16,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: persistent_inode.c,v 1.35 2006/06/22 14:59:28 jro Exp $
+ *  $Id: persistent_inode.c,v 1.36 2006/07/08 17:58:31 ezk Exp $
  */
 #ifdef UNIONFS_IMAP
 
@@ -617,10 +617,10 @@
  * bindex: the index of the branch that is being removed.
  *
  * This assumes that end hasen't been decremented yet.
- * 
+ *
  * Returns: This function really can't fail. The only thing
- * that could possibly happen is that it will oops but that 
- * requires unionfs to be in an inconsistant state which 
+ * that could possibly happen is that it will oops but that
+ * requires unionfs to be in an inconsistant state which
  * shoulden't happen.
  */
 int remove_map(struct super_block *sb, int bindex)
diff -urN unionfs-1.3/print.c unionfs-20060811-0102/print.c
--- unionfs-1.3/print.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/print.c	2006-08-11 07:02:57.000000000 +0200
@@ -16,7 +16,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: print.c,v 1.76 2006/06/01 03:11:03 jsipek Exp $
+ *  $Id: print.c,v 1.77 2006/07/08 17:58:31 ezk Exp $
  */
 
 /* Print debugging functions */
@@ -38,9 +38,9 @@
 	int prev = debug_mask;
 
 	debug_mask = val;
-	
+
 	printk(KERN_INFO UNIONFS_NAME ": debug mask set to %u\n", debug_mask);
-			
+
 	return prev;
 #else /* UNIONFS_DEBUG */
 	printk(KERN_WARNING UNIONFS_NAME ": debugging is not enabled\n");
@@ -150,7 +150,7 @@
 
 	if (!should_print(req))
 		return;
-	
+
 	if (!file) {
 		printk(KERN_DEBUG UNIONFS_NAME ": PF:%s: NULL FILE PASSED!\n", prefix);
 		return;
@@ -236,7 +236,7 @@
 	printk(KERN_DEBUG UNIONFS_NAME ": PD:%s%s: d_op=%p\n", prefix, prefix2, dentry->d_op);
 	printk(KERN_DEBUG UNIONFS_NAME ": PD:%s%s: d_fsdata=%p\n", prefix, prefix2,
 		    dentry->d_fsdata);
-	printk(KERN_DEBUG UNIONFS_NAME ": PD:%s%s: hlist_unhashed(d_hash)=%d\n", prefix, prefix2, 
+	printk(KERN_DEBUG UNIONFS_NAME ": PD:%s%s: hlist_unhashed(d_hash)=%d\n", prefix, prefix2,
 		    hlist_unhashed(&((struct dentry *)dentry)->d_hash));
 
 	/* After we have printed it, we can assert something about it. */
@@ -267,7 +267,7 @@
 
 	if (!dtopd(dentry))
 		return;
-	
+
 	printk(KERN_DEBUG UNIONFS_NAME ": PD:%s: dbstart=%d, dbend=%d, dbopaque=%d\n",
 		    prefix, dbstart(dentry), dbend(dentry), dbopaque(dentry));
 
@@ -309,7 +309,7 @@
 {
 	if (!should_print(req))
 		return;
-	
+
 	if (!inode) {
 		printk(KERN_DEBUG UNIONFS_NAME ": unionfs_checkinode - inode is NULL! (%s)\n",
 		       msg);
@@ -335,7 +335,7 @@
 			    inode->i_ino, msg);
 		return;
 	}
-	
+
 	printk(KERN_DEBUG UNIONFS_NAME ": inode->i_sb->s_type %p\n", inode->i_sb->s_type);
 	if (!inode->i_sb->s_type) {
 		printk(KERN_DEBUG UNIONFS_NAME
@@ -360,7 +360,7 @@
 
 	if (!should_print(req))
 		return;
-	
+
 	if (!sb) {
 		printk(KERN_DEBUG UNIONFS_NAME ": PSB:%s: NULL SB PASSED!\n", prefix);
 		return;
@@ -373,7 +373,7 @@
 	printk(KERN_DEBUG UNIONFS_NAME ": PSB:%s: s_maxbytes=%llu\n", prefix, sb->s_maxbytes);
 	printk(KERN_DEBUG UNIONFS_NAME ": PSB:%s: s_count=%d\n", prefix, sb->s_count);
 	printk(KERN_DEBUG UNIONFS_NAME ": PSB:%s: s_active=%d\n", prefix, atomic_read(&sb->s_active));
-	
+
 	if (stopd(sb))
 		printk(KERN_DEBUG UNIONFS_NAME ": sbstart=%d, sbend=%d\n", sbstart(sb),
 			    sbend(sb));
@@ -413,7 +413,7 @@
 
 	if (!should_print(req))
 		return 0;
-	
+
 	printk(KERN_DEBUG UNIONFS_NAME ": ");
 	va_start(ap, fmt);
 	r = vprintk(fmt, ap);
diff -urN unionfs-1.3/rdstate.c unionfs-20060811-0102/rdstate.c
--- unionfs-1.3/rdstate.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/rdstate.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: rdstate.c,v 1.33 2006/06/01 03:11:03 jsipek Exp $
+ *  $Id: rdstate.c,v 1.34 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
diff -urN unionfs-1.3/rename.c unionfs-20060811-0102/rename.c
--- unionfs-1.3/rename.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/rename.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: rename.c,v 1.45 2006/06/01 03:11:03 jsipek Exp $
+ *  $Id: rename.c,v 1.47 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -851,7 +852,7 @@
 		err = unionfs_partial_lookup(old_dentry);
 	else
 		err = may_rename_dir(old_dentry);
-	
+
 	if (err)
 		goto out;
 
diff -urN unionfs-1.3/subr.c unionfs-20060811-0102/subr.c
--- unionfs-1.3/subr.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/subr.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: subr.c,v 1.139 2006/06/01 03:11:03 jsipek Exp $
+ *  $Id: subr.c,v 1.141 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -63,8 +64,8 @@
 						       dentry, bindex);
 			if (!hidden_dentry || IS_ERR(hidden_dentry)) {
 				dprint(PRINT_DEBUG_WHITEOUT,
-					"create_parents failed for bindex = %d\n",
-					bindex);
+				       "create_parents failed for bindex = %d\n",
+				       bindex);
 				continue;
 			}
 		}
@@ -167,11 +168,9 @@
 		     | CAP_TO_MASK(CAP_SETPCAP)
 		     | CAP_TO_MASK(CAP_SETUID));
 
-	write_lock(&tasklist_lock);	/* task_capability_lock is not exported */
 	err = security_capget(current, &sio->cap.effective,
 			      &sio->cap.inheritable, &sio->cap.permitted);
 	if (err) {
-		write_unlock(&tasklist_lock);
 		printk(KERN_WARNING UNIONFS_NAME
 		       ": %s[%d]: security_capget failed\n",
 		       current->comm, current->pid);
@@ -181,7 +180,6 @@
 	super = cap_drop(super, drop);
 	security_capset_set(current, &super, &sio->cap.inheritable,
 			    &sio->cap.permitted);
-	write_unlock(&tasklist_lock);
 
 	rl = current->signal->rlim + RLIMIT_CORE;
 	task_lock(current->group_leader);	//??
@@ -200,10 +198,8 @@
 	current->signal->rlim[RLIMIT_CORE].rlim_cur = sio->rlim_core;
 	task_unlock(current->group_leader);
 
-	write_lock(&tasklist_lock);	/* task_capability_lock is not exported */
 	security_capset_set(current, &sio->cap.effective,
 			    &sio->cap.inheritable, &sio->cap.permitted);
-	write_unlock(&tasklist_lock);
 }
 
 int make_dir_opaque(struct dentry *dentry, int bindex)
diff -urN unionfs-1.3/super.c unionfs-20060811-0102/super.c
--- unionfs-1.3/super.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/super.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 2003-2005 Erez Zadok
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -17,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: super.c,v 1.96 2006/06/25 23:57:43 jro Exp $
+ *  $Id: super.c,v 1.98 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -158,14 +158,17 @@
 	print_exit_location();
 }
 
-static int unionfs_statfs(struct super_block *sb, struct kstatfs *buf)
+static int unionfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
 	int err = 0;
-	struct super_block *hidden_sb;
+	struct super_block *sb, *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;
 
@@ -190,7 +193,7 @@
 			continue;
 		}
 
-		err = vfs_statfs(hidden_sb, &rsb);
+		err = vfs_statfs(hidden_sb->s_root, &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,
@@ -411,8 +414,6 @@
 }
 
 /*
- * Called in do_umount() if the MNT_FORCE flag was used and this
- * function is defined.  See comment in linux/fs/super.c:do_umount().
  * Used only in nfs, to kill any pending RPC tasks, so that subsequent
  * code can actually succeed and won't leave tasks that need handling.
  *
@@ -420,21 +421,34 @@
  * left in the kernel after a user level file server (such as amd)
  * dies.
  */
-static void unionfs_umount_begin(struct super_block *sb)
+static void unionfs_umount_begin(struct vfsmount *mnt, int flags)
 {
-	struct super_block *hidden_sb;
+	struct super_block *sb, *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++) {
-		hidden_sb = stohs_index(sb, bindex);
-		if (hidden_sb && hidden_sb->s_op &&
+		hidden_mnt = stohiddenmnt_index(sb, bindex);
+		hidden_sb  = stohs_index(sb, bindex);
+
+		if (hidden_mnt && hidden_sb && hidden_sb->s_op &&
 		    hidden_sb->s_op->umount_begin)
-			hidden_sb->s_op->umount_begin(hidden_sb);
+			hidden_sb->s_op->umount_begin(hidden_mnt, flags);
 	}
+
+out:
 	print_exit_location();
 }
 
diff -urN unionfs-1.3/unionfs.h unionfs-20060811-0102/unionfs.h
--- unionfs-1.3/unionfs.h	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/unionfs.h	2006-08-11 07:02:57.000000000 +0200
@@ -387,7 +387,7 @@
 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);
+extern int unionfs_flush(struct file *file, fl_owner_t id);
 extern long unionfs_ioctl(struct file *file, unsigned int cmd,
 			  unsigned long arg);
 
diff -urN unionfs-1.3/unionfs.mod.c unionfs-20060811-0102/unionfs.mod.c
--- unionfs-1.3/unionfs.mod.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/unionfs.mod.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,134 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
-};
-
-static const struct modversion_info ____versions[]
-__attribute_used__
-__attribute__((section("__versions"))) = {
-	{ 0x34325848, "struct_module" },
-	{ 0x3d3084f7, "vfs_create" },
-	{ 0xb66daf94, "d_path" },
-	{ 0x2c730ad0, "kmem_cache_destroy" },
-	{ 0x12da5bb2, "__kmalloc" },
-	{ 0x8e61c31b, "get_sb_nodev" },
-	{ 0xd92bc508, "generic_file_llseek" },
-	{ 0x3177b733, "__mark_inode_dirty" },
-	{ 0xd6ee688f, "vmalloc" },
-	{ 0x3f3b8c0, "vfs_readdir" },
-	{ 0x89b301d4, "param_get_int" },
-	{ 0x7487ea87, "vfs_link" },
-	{ 0x79aa04a2, "get_random_bytes" },
-	{ 0x74cc238d, "current_kernel_time" },
-	{ 0x63513236, "malloc_sizes" },
-	{ 0xdcad1960, "vfs_llseek" },
-	{ 0x28a05ab8, "__lock_page" },
-	{ 0x20000329, "simple_strtoul" },
-	{ 0x5ed19c8e, "_spin_lock" },
-	{ 0xb5ed4c4a, "dput" },
-	{ 0xd39039c9, "seq_printf" },
-	{ 0xa03d6a57, "__get_user_4" },
-	{ 0x1a611024, "vfs_follow_link" },
-	{ 0x7fab7df4, "rwsem_down_write_failed" },
-	{ 0x26fc3d33, "dentry_open" },
-	{ 0xf9e56c09, "vfs_mknod" },
-	{ 0x568258c2, "names_cachep" },
-	{ 0x1e93a0ac, "mutex_unlock" },
-	{ 0x85df9b6c, "strsep" },
-	{ 0xaf735217, "generic_read_dir" },
-	{ 0x2fd1d81c, "vfree" },
-	{ 0x98bd6f46, "param_set_int" },
-	{ 0xe0c7a928, "igrab" },
-	{ 0x22c901d1, "vfs_symlink" },
-	{ 0x7d11c268, "jiffies" },
-	{ 0xd533bec7, "__might_sleep" },
-	{ 0x857e5991, "vfs_rmdir" },
-	{ 0x436ff0ac, "unlock_rename" },
-	{ 0x12f237eb, "__kzalloc" },
-	{ 0xdd0a2ba2, "strlcat" },
-	{ 0xa5a8db80, "cap_capset_set" },
-	{ 0x7c60d66e, "getname" },
-	{ 0x9c94131c, "tasklist_lock" },
-	{ 0x1b7d4074, "printk" },
-	{ 0x59650e56, "d_rehash" },
-	{ 0x64263773, "find_or_create_page" },
-	{ 0x287cfece, "rwsem_wake" },
-	{ 0x5568be43, "lock_kernel" },
-	{ 0xcee6910a, "kunmap" },
-	{ 0xd2e8ca30, "vfs_getxattr" },
-	{ 0x2da418b5, "copy_to_user" },
-	{ 0xaec4759f, "vprintk" },
-	{ 0x81959483, "kmem_cache_free" },
-	{ 0x95393e63, "lock_rename" },
-	{ 0xca2e98e7, "mutex_lock" },
-	{ 0x7a73a9a8, "dcache_lock" },
-	{ 0xb2769b73, "wait_on_page_bit" },
-	{ 0x4a44a237, "unlock_page" },
-	{ 0x696c2be6, "path_release" },
-	{ 0x2280be3, "fput" },
-	{ 0x8a0ee87d, "_spin_unlock" },
-	{ 0x3cd7ec73, "inode_init_once" },
-	{ 0x5dfe8f1a, "unlock_kernel" },
-	{ 0x7dceceac, "capable" },
-	{ 0xf705f81d, "_write_lock" },
-	{ 0x45877b0, "kmem_cache_alloc" },
-	{ 0xb2fd5ceb, "__put_user_4" },
-	{ 0x77f457f9, "path_lookup" },
-	{ 0xe69bd6cc, "kmap" },
-	{ 0x4fa97ab5, "mntput_no_expire" },
-	{ 0x41cbe239, "d_alloc" },
-	{ 0x107d6ba3, "__get_free_pages" },
-	{ 0x72393511, "cap_capget" },
-	{ 0x53b235f6, "unlock_new_inode" },
-	{ 0xe3ef56e1, "vfs_statfs" },
-	{ 0xcd2b71, "vfs_mkdir" },
-	{ 0x303bc80f, "_write_unlock" },
-	{ 0x15994472, "vfs_unlink" },
-	{ 0xe8b5e4e4, "kmem_cache_create" },
-	{ 0x5d9163b4, "register_filesystem" },
-	{ 0x9941ccb8, "free_pages" },
-	{ 0x952584d1, "cap_inode_setxattr" },
-	{ 0x5e0d1f56, "kmem_cache_zalloc" },
-	{ 0x2d75922c, "iput" },
-	{ 0x5d1ff271, "read_cache_page" },
-	{ 0x37a0cba, "kfree" },
-	{ 0x91835a6e, "iunique" },
-	{ 0x1746af6e, "generic_permission" },
-	{ 0x1be14bd8, "permission" },
-	{ 0xddf6b2fc, "d_splice_alias" },
-	{ 0x576d54e6, "put_page" },
-	{ 0x60a4461c, "__up_wakeup" },
-	{ 0xf4df9af4, "unregister_filesystem" },
-	{ 0x6f1ba3a, "init_special_inode" },
-	{ 0x25da070, "snprintf" },
-	{ 0x8e426d0d, "lookup_one_len" },
-	{ 0x96b27088, "__down_failed" },
-	{ 0xa120a21a, "vfs_rename" },
-	{ 0xf2a644fb, "copy_from_user" },
-	{ 0x6e2266b0, "notify_change" },
-	{ 0xe4d7cb6b, "vfs_setxattr" },
-	{ 0x17ac622c, "clear_inode" },
-	{ 0xd3ae4b72, "d_instantiate" },
-	{ 0x8bb87e1a, "get_write_access" },
-	{ 0x1a88efd9, "rwsem_down_read_failed" },
-	{ 0x589cb4a8, "vfs_removexattr" },
-	{ 0x4e3e731e, "iget_locked" },
-	{ 0xa9069d22, "vfs_write" },
-	{ 0xf8ed060c, "generic_shutdown_super" },
-};
-
-static const char __module_depends[]
-__attribute_used__
-__attribute__((section(".modinfo"))) =
-"depends=";
-
diff -urN unionfs-1.3/unlink.c unionfs-20060811-0102/unlink.c
--- unionfs-1.3/unlink.c	2006-06-26 21:46:44.000000000 +0200
+++ unionfs-20060811-0102/unlink.c	2006-08-11 07:02:57.000000000 +0200
@@ -1,7 +1,8 @@
 /*
  * Copyright (c) 2003-2006 Erez Zadok
  * Copyright (c) 2003-2006 Charles P. Wright
- * Copyright (c) 2005-2006 Josef Sipek
+ * Copyright (c) 2005-2006 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
  * Copyright (c) 2005      Arun M. Krishnakumar
  * Copyright (c) 2005-2006 David P. Quigley
  * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
@@ -16,7 +17,7 @@
  * This Copyright notice must be kept intact and distributed with all sources.
  */
 /*
- *  $Id: unlink.c,v 1.42 2006/06/01 03:11:03 jsipek Exp $
+ *  $Id: unlink.c,v 1.44 2006/08/05 01:28:46 jro Exp $
  */
 
 #include "unionfs.h"
@@ -307,7 +308,7 @@
 	if (err) {
 #if 0
 		/* vfs_rmdir(our caller) unhashed the dentry.  This will recover
-		 * the Unionfs inode number for the directory itself, but the 
+		 * the Unionfs inode number for the directory itself, but the
 		 * children are already lost.  It seems that tmpfs manages its
 		 * way around this by upping the refcount on everything.
 		 *
