SOURCES (Titanium): kernel-desktop-unionfs.patch - since source has 1 hunk, ...

shadzik shadzik at pld-linux.org
Tue Mar 24 13:39:04 CET 2009


Author: shadzik                      Date: Tue Mar 24 12:39:04 2009 GMT
Module: SOURCES                       Tag: Titanium
---- Log message:
- since source has 1 hunk, we need to fix it here

---- Files affected:
SOURCES:
   kernel-desktop-unionfs.patch (1.2 -> 1.2.2.1) 

---- Diffs:

================================================================
Index: SOURCES/kernel-desktop-unionfs.patch
diff -u SOURCES/kernel-desktop-unionfs.patch:1.2 SOURCES/kernel-desktop-unionfs.patch:1.2.2.1
--- SOURCES/kernel-desktop-unionfs.patch:1.2	Wed Apr  9 00:19:09 2008
+++ SOURCES/kernel-desktop-unionfs.patch	Tue Mar 24 13:38:58 2009
@@ -1,8 +1,8 @@
 diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
-index 1de155e..b168331 100644
+index 52cd611..bc6b437 100644
 --- a/Documentation/filesystems/00-INDEX
 +++ b/Documentation/filesystems/00-INDEX
-@@ -96,6 +96,8 @@ udf.txt
+@@ -106,6 +106,8 @@ udf.txt
  	- info and mount options for the UDF filesystem.
  ufs.txt
  	- info on the ufs filesystem.
@@ -29,10 +29,10 @@
 +	- Usage information and examples.
 diff --git a/Documentation/filesystems/unionfs/concepts.txt b/Documentation/filesystems/unionfs/concepts.txt
 new file mode 100644
-index 0000000..bed69bd
+index 0000000..b853788
 --- /dev/null
 +++ b/Documentation/filesystems/unionfs/concepts.txt
-@@ -0,0 +1,213 @@
+@@ -0,0 +1,287 @@
 +Unionfs 2.x CONCEPTS:
 +=====================
 +
@@ -87,6 +87,42 @@
 +eliminate 'foo' from the namespace (as well as the whiteout itself.)
 +
 +
++Opaque Directories:
++===================
++
++Assume we have a unionfs mount comprising of two branches.  Branch 0 is
++empty; branch 1 has the directory /a and file /a/f.  Let's say we mount a
++union of branch 0 as read-write and branch 1 as read-only.  Now, let's say
++we try to perform the following operation in the union:
++
++	rm -fr a
++
++Because branch 1 is not writable, we cannot physically remove the file /a/f
++or the directory /a.  So instead, we will create a whiteout in branch 0
++named /.wh.a, masking out the name "a" from branch 1.  Next, let's say we
++try to create a directory named "a" as follows:
++
++	mkdir a
++
++Because we have a whiteout for "a" already, Unionfs behaves as if "a"
++doesn't exist, and thus will delete the whiteout and replace it with an
++actual directory named "a".
++
++The problem now is that if you try to "ls" in the union, Unionfs will
++perform is normal directory name unification, for *all* directories named
++"a" in all branches.  This will cause the file /a/f from branch 1 to
++re-appear in the union's namespace, which violates Unix semantics.
++
++To avoid this problem, we have a different form of whiteouts for
++directories, called "opaque directories" (same as BSD Union Mount does).
++Whenever we replace a whiteout with a directory, that directory is marked as
++opaque.  In Unionfs 2.x, it means that we create a file named
++/a/.wh.__dir_opaque in branch 0, after having created directory /a there.
++When unionfs notices that a directory is opaque, it stops all namespace
++operations (including merging readdir contents) at that opaque directory.
++This prevents re-exposing names from masked out directories.
++
++
 +Duplicate Elimination:
 +======================
 +
@@ -97,6 +133,31 @@
 +(numerically lowest value) and "hide" the others.
 +
 +
++Unlinking:
++=========
++
++Unlink operation on non-directory instances is optimized to remove the
++maximum possible objects in case multiple underlying branches have the same
++file name.  The unlink operation will first try to delete file instances
++from highest priority branch and then move further to delete from remaining
++branches in order of their decreasing priority.  Consider a case (F..D..F),
++where F is a file and D is a directory of the same name; here, some
++intermediate branch could have an empty directory instance with the same
++name, so this operation also tries to delete this directory instance and
++proceed further to delete from next possible lower priority branch.  The
++unionfs unlink operation will smoothly delete the files with same name from
++all possible underlying branches.  In case if some error occurs, it creates
++whiteout in highest priority branch that will hide file instance in rest of
++the branches.  An error could occur either if an unlink operations in any of
++the underlying branch failed or if a branch has no write permission.
++
++This unlinking policy is known as "delete all" and it has the benefit of
++overall reducing the number of inodes used by duplicate files, and further
++reducing the total number of inodes consumed by whiteouts.  The cost is of
++extra processing, but testing shows this extra processing is well worth the
++savings.
++
++
 +Copyup:
 +=======
 +
@@ -245,6 +306,19 @@
 +for the same file(s).  Lastly, this delayed time attribute detection is
 +similar to how NFS clients operate (e.g., acregmin).
 +
++Finally, there is no way currently in Linux to prevent lower directories
++from being moved around (i.e., topology changes); there's no way to prevent
++modifications to directory sub-trees of whole file systems which are mounted
++read-write.  It is therefore possible for in-flight operations in unionfs to
++take place, while a lower directory is being moved around.  Therefore, if
++you try to, say, create a new file in a directory through unionfs, while the
++directory is being moved around directly, then the new file may get created
++in the new location where that directory was moved to.  This is a somewhat
++similar behaviour in NFS: an NFS client could be creating a new file while
++th NFS server is moving th directory around; the file will get successfully
++created in the new location.  (The one exception in unionfs is that if the
++branch is marked read-only by unionfs, then a copyup will take place.)
++
 +For more information, see <http://unionfs.filesystems.org/>.
 diff --git a/Documentation/filesystems/unionfs/issues.txt b/Documentation/filesystems/unionfs/issues.txt
 new file mode 100644
@@ -458,107 +532,76 @@
 +
 +For more information, see <http://unionfs.filesystems.org/>.
 diff --git a/MAINTAINERS b/MAINTAINERS
-index b4f611c..d68b687 100644
+index fbc8fa5..9b7a352 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -3804,6 +3804,15 @@ L:	linux-kernel at vger.kernel.org
+@@ -4294,6 +4294,14 @@ L:	linux-kernel at vger.kernel.org
  W:	http://www.kernel.dk
  S:	Maintained
  
 +UNIONFS
 +P:	Erez Zadok
 +M:	ezk at cs.sunysb.edu
-+P:	Josef "Jeff" Sipek
-+M:	jsipek at cs.sunysb.edu
 +L:	unionfs at filesystems.org
 +W:	http://unionfs.filesystems.org
++T:	git git.kernel.org/pub/scm/linux/kernel/git/ezk/unionfs.git
 +S:	Maintained
 +
- USB ACM DRIVER
- P:	Oliver Neukum
- M:	oliver at neukum.name
-diff --git a/fs/Kconfig b/fs/Kconfig
-index 487236c..55a78b7 100644
---- a/fs/Kconfig
-+++ b/fs/Kconfig
-@@ -1041,6 +1041,47 @@ config CONFIGFS_FS
- 
- endmenu
- 
-+menu "Layered filesystems"
-+
-+config ECRYPT_FS
-+	tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
-+	depends on EXPERIMENTAL && KEYS && CRYPTO && NET
-+	help
-+	  Encrypted filesystem that operates on the VFS layer.  See
-+	  <file:Documentation/filesystems/ecryptfs.txt> to learn more about
-+	  eCryptfs.  Userspace components are required and can be
-+	  obtained from <http://ecryptfs.sf.net>.
-+
-+	  To compile this file system support as a module, choose M here: the
-+	  module will be called ecryptfs.
-+
+ UNSORTED BLOCK IMAGES (UBI)
+ P:	Artem Bityutskiy
+ M:	dedekind at infradead.org
+--- /dev/null	2007-02-13 17:29:53.000000000 +0100
++++ linux-2.6.29/fs/unionfs/Kconfig	2009-03-24 13:07:49.116382161 +0100
+@@ -0,0 +1,25 @@
 +config UNION_FS
-+	tristate "Union file system (EXPERIMENTAL)"
-+	depends on EXPERIMENTAL
-+	help
-+	  Unionfs is a stackable unification file system, which appears to
-+	  merge the contents of several directories (branches), while keeping
-+	  their physical content separate.
++       tristate "Union file system (EXPERIMENTAL)"
++       depends on EXPERIMENTAL
++       help
++         Unionfs is a stackable unification file system, which appears to
++         merge the contents of several directories (branches), while keeping
++         their physical content separate.
 +
-+	  See <http://unionfs.filesystems.org> for details
++         See <http://unionfs.filesystems.org> for details
 +
 +config UNION_FS_XATTR
-+	bool "Unionfs extended attributes"
-+	depends on UNION_FS
-+	help
-+	  Extended attributes are name:value pairs associated with inodes by
-+	  the kernel or by users (see the attr(5) manual page).
++       bool "Unionfs extended attributes"
++       depends on UNION_FS
++       help
++         Extended attributes are name:value pairs associated with inodes by
++         the kernel or by users (see the attr(5) manual page).
 +
-+	  If unsure, say N.
++         If unsure, say N.
 +
 +config UNION_FS_DEBUG
-+	bool "Debug Unionfs"
-+	depends on UNION_FS
-+	help
-+	  If you say Y here, you can turn on debugging output from Unionfs.
-+
-+endmenu
-+
- menu "Miscellaneous filesystems"
- 
- config ADFS_FS
-@@ -1093,18 +1134,6 @@ config AFFS_FS
- 	  To compile this file system support as a module, choose M here: the
- 	  module will be called affs.  If unsure, say N.
- 
--config ECRYPT_FS
--	tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
--	depends on EXPERIMENTAL && KEYS && CRYPTO && NET
--	help
--	  Encrypted filesystem that operates on the VFS layer.  See
--	  <file:Documentation/filesystems/ecryptfs.txt> to learn more about
--	  eCryptfs.  Userspace components are required and can be
--	  obtained from <http://ecryptfs.sf.net>.
--
--	  To compile this file system support as a module, choose M here: the
--	  module will be called ecryptfs.
--
- config HFS_FS
- 	tristate "Apple Macintosh file system support (EXPERIMENTAL)"
- 	depends on BLOCK && EXPERIMENTAL
++       bool "Debug Unionfs"
++       depends on UNION_FS
++       help
++         If you say Y here, you can turn on debugging output from Unionfs.
++
+--- linux-2.6.29/fs/Kconfig~	2009-03-24 13:06:08.609715416 +0100
++++ linux-2.6.29/fs/Kconfig	2009-03-24 13:08:40.063033558 +0100
+@@ -246,6 +246,7 @@
+ source "fs/adfs/Kconfig"
+ source "fs/affs/Kconfig"
+ source "fs/ecryptfs/Kconfig"
++source "fs/unionfs/Kconfig"
+ source "fs/hfs/Kconfig"
+ source "fs/hfsplus/Kconfig"
+ source "fs/befs/Kconfig"
 diff --git a/fs/Makefile b/fs/Makefile
-index 500cf15..e202288 100644
+index d9f8afe..e7b036c 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
-@@ -118,3 +118,4 @@ obj-$(CONFIG_HPPFS)		+= hppfs/
- obj-$(CONFIG_DEBUG_FS)		+= debugfs/
- obj-$(CONFIG_OCFS2_FS)		+= ocfs2/
- obj-$(CONFIG_GFS2_FS)           += gfs2/
+@@ -86,6 +86,7 @@ obj-$(CONFIG_ISO9660_FS)	+= isofs/
+ obj-$(CONFIG_HFSPLUS_FS)	+= hfsplus/ # Before hfs to find wrapped HFS+
+ obj-$(CONFIG_HFS_FS)		+= hfs/
+ obj-$(CONFIG_ECRYPT_FS)		+= ecryptfs/
 +obj-$(CONFIG_UNION_FS)		+= unionfs/
+ obj-$(CONFIG_VXFS_FS)		+= freevxfs/
+ obj-$(CONFIG_NFS_FS)		+= nfs/
+ obj-$(CONFIG_EXPORTFS)		+= exportfs/
 diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c
-index cb20b96..a8c1686 100644
+index 5e59658..4621f89 100644
 --- a/fs/ecryptfs/dentry.c
 +++ b/fs/ecryptfs/dentry.c
 @@ -62,7 +62,7 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
@@ -571,10 +614,10 @@
  out:
  	return rc;
 diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
-index 5a71918..89e8560 100644
+index 5e78fc1..3f13ea1 100644
 --- a/fs/ecryptfs/inode.c
 +++ b/fs/ecryptfs/inode.c
-@@ -576,9 +576,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+@@ -589,9 +589,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
  			lower_new_dir_dentry->d_inode, lower_new_dentry);
  	if (rc)
  		goto out_lock;
@@ -586,9 +629,9 @@
  out_lock:
  	unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
  	dput(lower_new_dentry->d_parent);
-@@ -912,7 +912,7 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
- 
+@@ -914,7 +914,7 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
  	rc = notify_change(lower_dentry, ia);
+ 	mutex_unlock(&lower_dentry->d_inode->i_mutex);
  out:
 -	fsstack_copy_attr_all(inode, lower_inode, NULL);
 +	fsstack_copy_attr_all(inode, lower_inode);
@@ -596,10 +639,10 @@
  }
  
 diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
-index e5580bc..6276cdf 100644
+index 64d2ba9..f91feb3 100644
 --- a/fs/ecryptfs/main.c
 +++ b/fs/ecryptfs/main.c
-@@ -211,7 +211,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry,
+@@ -193,7 +193,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry,
  		d_add(dentry, inode);
  	else
  		d_instantiate(dentry, inode);
@@ -609,27 +652,104 @@
  	 * other metadata */
  	fsstack_copy_inode_size(inode, lower_inode);
 diff --git a/fs/namei.c b/fs/namei.c
-index 3b993db..14f9861 100644
+index 3ca2574..c2f5770 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -389,6 +389,7 @@ void release_open_intent(struct nameidata *nd)
+@@ -379,6 +379,7 @@ void release_open_intent(struct nameidata *nd)
  	else
  		fput(nd->intent.open.file);
  }
-+EXPORT_SYMBOL(release_open_intent);
++EXPORT_SYMBOL_GPL(release_open_intent);
  
  static inline struct dentry *
  do_revalidate(struct dentry *dentry, struct nameidata *nd)
+diff --git a/fs/splice.c b/fs/splice.c
+index 1eaef06..53263ac 100644
+--- a/fs/splice.c
++++ b/fs/splice.c
+@@ -887,8 +887,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+ /*
+  * Attempt to initiate a splice from pipe to file.
+  */
+-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+-			   loff_t *ppos, size_t len, unsigned int flags)
++long vfs_splice_from(struct pipe_inode_info *pipe, struct file *out,
++		     loff_t *ppos, size_t len, unsigned int flags)
+ {
+ 	int ret;
+ 
+@@ -907,13 +907,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ 
+ 	return out->f_op->splice_write(pipe, out, ppos, len, flags);
+ }
++EXPORT_SYMBOL_GPL(vfs_splice_from);
+ 
+ /*
+  * Attempt to initiate a splice from a file to a pipe.
+  */
+-static long do_splice_to(struct file *in, loff_t *ppos,
+-			 struct pipe_inode_info *pipe, size_t len,
+-			 unsigned int flags)
++long vfs_splice_to(struct file *in, loff_t *ppos,
++		   struct pipe_inode_info *pipe, size_t len,
++		   unsigned int flags)
+ {
+ 	int ret;
+ 
+@@ -929,6 +930,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
+ 
+ 	return in->f_op->splice_read(in, ppos, pipe, len, flags);
+ }
++EXPORT_SYMBOL_GPL(vfs_splice_to);
+ 
+ /**
+  * splice_direct_to_actor - splices data directly between two non-pipes
+@@ -998,7 +1000,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+ 		size_t read_len;
+ 		loff_t pos = sd->pos, prev_pos = pos;
+ 
+-		ret = do_splice_to(in, &pos, pipe, len, flags);
++		ret = vfs_splice_to(in, &pos, pipe, len, flags);
+ 		if (unlikely(ret <= 0))
+ 			goto out_release;
+ 
+@@ -1057,7 +1059,7 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
+ {
+ 	struct file *file = sd->u.file;
+ 
+-	return do_splice_from(pipe, file, &sd->pos, sd->total_len, sd->flags);
++	return vfs_splice_from(pipe, file, &sd->pos, sd->total_len, sd->flags);
+ }
+ 
+ /**
+@@ -1131,7 +1133,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+ 		} else
+ 			off = &out->f_pos;
+ 
+-		ret = do_splice_from(pipe, out, off, len, flags);
++		ret = vfs_splice_from(pipe, out, off, len, flags);
+ 
+ 		if (off_out && copy_to_user(off_out, off, sizeof(loff_t)))
+ 			ret = -EFAULT;
+@@ -1152,7 +1154,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+ 		} else
+ 			off = &in->f_pos;
+ 
+-		ret = do_splice_to(in, off, pipe, len, flags);
++		ret = vfs_splice_to(in, off, pipe, len, flags);
+ 
+ 		if (off_in && copy_to_user(off_in, off, sizeof(loff_t)))
+ 			ret = -EFAULT;
 diff --git a/fs/stack.c b/fs/stack.c
-index 67716f6..4336f2b 100644
+index 67716f6..cc1443d 100644
 --- a/fs/stack.c
 +++ b/fs/stack.c
-@@ -1,24 +1,42 @@
+@@ -1,24 +1,82 @@
 +/*
-+ * Copyright (c) 2006-2007 Erez Zadok
++ * Copyright (c) 2006-2009 Erez Zadok
 + * Copyright (c) 2006-2007 Josef 'Jeff' Sipek
-+ * Copyright (c) 2006-2007 Stony Brook University
-+ * Copyright (c) 2006-2007 The Research Foundation of SUNY
++ * Copyright (c) 2006-2009 Stony Brook University
++ * Copyright (c) 2006-2009 The Research Foundation of SUNY
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
@@ -647,17 +767,59 @@
   * This function cannot be inlined since i_size_{read,write} is rather
   * heavy-weight on 32-bit systems
   */
- void fsstack_copy_inode_size(struct inode *dst, const struct inode *src)
+-void fsstack_copy_inode_size(struct inode *dst, const struct inode *src)
++void fsstack_copy_inode_size(struct inode *dst, struct inode *src)
  {
 -	i_size_write(dst, i_size_read((struct inode *)src));
-+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
-+	spin_lock(&dst->i_lock);
-+#endif
-+	i_size_write(dst, i_size_read(src));
- 	dst->i_blocks = src->i_blocks;
-+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
-+	spin_unlock(&dst->i_lock);
-+#endif
+-	dst->i_blocks = src->i_blocks;
++	loff_t i_size;
++	blkcnt_t i_blocks;
++
++	/*
++	 * i_size_read() includes its own seqlocking and protection from
++	 * preemption (see include/linux/fs.h): we need nothing extra for
++	 * that here, and prefer to avoid nesting locks than attempt to
++	 * keep i_size and i_blocks in synch together.
++	 */
++	i_size = i_size_read(src);
++
++	/*
++	 * But if CONFIG_LSF (on 32-bit), we ought to make an effort to keep
++	 * the two halves of i_blocks in synch despite SMP or PREEMPT - though
++	 * stat's generic_fillattr() doesn't bother, and we won't be applying
++	 * quotas (where i_blocks does become important) at the upper level.
++	 *
++	 * We don't actually know what locking is used at the lower level; but
++	 * if it's a filesystem that supports quotas, it will be using i_lock
++	 * as in inode_add_bytes().  tmpfs uses other locking, and its 32-bit
++	 * is (just) able to exceed 2TB i_size with the aid of holes; but its
++	 * i_blocks cannot carry into the upper long without almost 2TB swap -
++	 * let's ignore that case.
++	 */
++	if (sizeof(i_blocks) > sizeof(long))
++		spin_lock(&src->i_lock);
++	i_blocks = src->i_blocks;
++	if (sizeof(i_blocks) > sizeof(long))
++		spin_unlock(&src->i_lock);
++
++	/*
++	 * If CONFIG_SMP on 32-bit, it's vital for fsstack_copy_inode_size()
++	 * to hold some lock around i_size_write(), otherwise i_size_read()
++	 * may spin forever (see include/linux/fs.h).  We don't necessarily
++	 * hold i_mutex when this is called, so take i_lock for that case.
++	 *
++	 * And if CONFIG_LSF (on 32-bit), continue our effort to keep the
++	 * two halves of i_blocks in synch despite SMP or PREEMPT: use i_lock
++	 * for that case too, and do both at once by combining the tests.
++	 *
++	 * There is none of this locking overhead in the 64-bit case.
++	 */
++	if (sizeof(i_size) > sizeof(long) || sizeof(i_blocks) > sizeof(long))
++		spin_lock(&dst->i_lock);
++	i_size_write(dst, i_size);
++	dst->i_blocks = i_blocks;
++	if (sizeof(i_size) > sizeof(long) || sizeof(i_blocks) > sizeof(long))
++		spin_unlock(&dst->i_lock);
  }
  EXPORT_SYMBOL_GPL(fsstack_copy_inode_size);
  
@@ -672,7 +834,7 @@
  {
  	dest->i_mode = src->i_mode;
  	dest->i_uid = src->i_uid;
-@@ -29,14 +47,6 @@ void fsstack_copy_attr_all(struct inode *dest, const struct inode *src,
+@@ -29,14 +87,6 @@ void fsstack_copy_attr_all(struct inode *dest, const struct inode *src,
  	dest->i_ctime = src->i_ctime;
  	dest->i_blkbits = src->i_blkbits;
  	dest->i_flags = src->i_flags;
@@ -690,11 +852,11 @@
  EXPORT_SYMBOL_GPL(fsstack_copy_attr_all);
 diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile
 new file mode 100644
-index 0000000..aa6aa7f
+index 0000000..5251b87
 --- /dev/null
 +++ b/fs/unionfs/Makefile
 @@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.2.2 (for 2.6.24-rc7)"
++UNIONFS_VERSION="2.5.1 (for 2.6.28.1)"
 +
 +EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
 +
@@ -702,7 +864,7 @@
 +
 +unionfs-y := subr.o dentry.o file.o inode.o main.o super.o \
 +	rdstate.o copyup.o dirhelper.o rename.o unlink.o \
-+	lookup.o commonfops.o dirfops.o sioq.o mmap.o
++	lookup.o commonfops.o dirfops.o sioq.o mmap.o whiteout.o
 +
 +unionfs-$(CONFIG_UNION_FS_XATTR) += xattr.o
 +
@@ -713,12 +875,12 @@
 +endif
 diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
 new file mode 100644
-index 0000000..f37192f
+index 0000000..63ee085
 --- /dev/null
 +++ b/fs/unionfs/commonfops.c
-@@ -0,0 +1,835 @@
+@@ -0,0 +1,879 @@
 +/*
-+ * Copyright (c) 2003-2007 Erez Zadok
++ * Copyright (c) 2003-2009 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
 + * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
 + * Copyright (c) 2005-2006 Junjiro Okajima
@@ -727,8 +889,8 @@
 + * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
 + * Copyright (c) 2003      Puja Gupta
 + * Copyright (c) 2003      Harikesavan Krishnan
-+ * Copyright (c) 2003-2007 Stony Brook University
-+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
++ * Copyright (c) 2003-2009 Stony Brook University
++ * Copyright (c) 2003-2009 The Research Foundation of SUNY
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
@@ -743,7 +905,7 @@
 + * stolen from NFS's silly rename
 + */
 +static int copyup_deleted_file(struct file *file, struct dentry *dentry,
-+			       int bstart, int bindex)
++			       struct dentry *parent, int bstart, int bindex)
 +{
 +	static unsigned int counter;
 +	const int i_inosize = sizeof(dentry->d_inode->i_ino) * 2;
@@ -790,8 +952,7 @@
 +	} while (tmp_dentry->d_inode != NULL);	/* need negative dentry */
 +	dput(tmp_dentry);
 +
-+	err = copyup_named_file(dentry->d_parent->d_inode, file, name, bstart,
-+				bindex,
++	err = copyup_named_file(parent->d_inode, file, name, bstart, bindex,
 +				i_size_read(file->f_path.dentry->d_inode));
 +	if (err) {
 +		if (unlikely(err == -EEXIST))
@@ -900,6 +1061,7 @@
 +				    unionfs_lower_mnt_idx(dentry, bindex),
 +				    file->f_flags);
 +		if (IS_ERR(lower_file)) {
++			branchput(sb, bindex);
 +			err = PTR_ERR(lower_file);
 +			goto out;
 +		} else {
@@ -917,7 +1079,8 @@
 +	struct file *lower_file;
 +	struct dentry *lower_dentry;
 +	struct dentry *dentry = file->f_path.dentry;
-+	struct inode *parent_inode = dentry->d_parent->d_inode;
++	struct dentry *parent = dget_parent(dentry);
++	struct inode *parent_inode = parent->d_inode;
 +	struct super_block *sb = dentry->d_sb;
 +
 +	bstart = dbstart(dentry);
@@ -953,15 +1116,16 @@
 +
 +	memcpy(&lower_file->f_ra, &file->f_ra, sizeof(struct file_ra_state));
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-desktop-unionfs.patch?r1=1.2&r2=1.2.2.1&f=u



More information about the pld-cvs-commit mailing list