packages: kernel/kernel-unionfs.patch, kernel/kernel.spec - update unionfs ...

arekm arekm at pld-linux.org
Mon Oct 24 21:46:37 CEST 2011


Author: arekm                        Date: Mon Oct 24 19:46:37 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update unionfs to unionfs-2.5.10_for_3.1.0-rc4.diff.gz

---- Files affected:
packages/kernel:
   kernel-unionfs.patch (1.14 -> 1.15) , kernel.spec (1.989 -> 1.990) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-unionfs.patch
diff -u packages/kernel/kernel-unionfs.patch:1.14 packages/kernel/kernel-unionfs.patch:1.15
--- packages/kernel/kernel-unionfs.patch:1.14	Mon Jul 11 21:51:13 2011
+++ packages/kernel/kernel-unionfs.patch	Mon Oct 24 21:46:31 2011
@@ -532,10 +532,10 @@
 +
 +For more information, see <http://unionfs.filesystems.org/>.
 diff --git a/MAINTAINERS b/MAINTAINERS
-index f0358cd..7ae0669 100644
+index 28f65c2..512f312 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -6375,6 +6375,14 @@ F:	Documentation/cdrom/
+@@ -6612,6 +6612,14 @@ F:	Documentation/cdrom/
  F:	drivers/cdrom/cdrom.c
  F:	include/linux/cdrom.h
  
@@ -551,10 +551,10 @@
  M:	Artem Bityutskiy <dedekind1 at gmail.com>
  W:	http://www.linux-mtd.infradead.org/
 diff --git a/fs/Kconfig b/fs/Kconfig
-index 19891aa..ac8a074 100644
+index 9fe0b34..e863a66 100644
 --- a/fs/Kconfig
 +++ b/fs/Kconfig
-@@ -187,6 +187,7 @@ if MISC_FILESYSTEMS
+@@ -194,6 +194,7 @@ if MISC_FILESYSTEMS
  source "fs/adfs/Kconfig"
  source "fs/affs/Kconfig"
  source "fs/ecryptfs/Kconfig"
@@ -563,10 +563,10 @@
  source "fs/hfsplus/Kconfig"
  source "fs/befs/Kconfig"
 diff --git a/fs/Makefile b/fs/Makefile
-index fb68c2b..8ca9290 100644
+index afc1096..2c0627b 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
-@@ -83,6 +83,7 @@ obj-$(CONFIG_ISO9660_FS)	+= isofs/
+@@ -82,6 +82,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/
@@ -575,10 +575,10 @@
  obj-$(CONFIG_NFS_FS)		+= nfs/
  obj-$(CONFIG_EXPORTFS)		+= exportfs/
 diff --git a/fs/namei.c b/fs/namei.c
-index 0223c41..5d0261e 100644
+index 2826db3..38628ef 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -484,6 +484,7 @@ void release_open_intent(struct nameidata *nd)
+@@ -490,6 +490,7 @@ void release_open_intent(struct nameidata *nd)
  			fput(file);
  	}
  }
@@ -586,7 +586,7 @@
  
  static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd)
  {
-@@ -1740,6 +1741,42 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
+@@ -1807,6 +1808,42 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
  	return __lookup_hash(&this, base, NULL);
  }
  
@@ -629,7 +629,7 @@
  int user_path_at(int dfd, const char __user *name, unsigned flags,
  		 struct path *path)
  {
-@@ -3339,6 +3376,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
+@@ -3369,6 +3406,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
  EXPORT_SYMBOL(getname);
  EXPORT_SYMBOL(lock_rename);
  EXPORT_SYMBOL(lookup_one_len);
@@ -638,7 +638,7 @@
  EXPORT_SYMBOL(page_put_link);
  EXPORT_SYMBOL(page_readlink);
 diff --git a/fs/splice.c b/fs/splice.c
-index aa866d3..421ab86 100644
+index fa2defa..ba17a96 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
 @@ -1085,8 +1085,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@@ -717,7 +717,7 @@
  		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 4a6f7f4..7eeef12 100644
+index b4f2ab4..7c61d05 100644
 --- a/fs/stack.c
 +++ b/fs/stack.c
 @@ -1,8 +1,20 @@
@@ -774,11 +774,11 @@
 +	  If you say Y here, you can turn on debugging output from Unionfs.
 diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile
 new file mode 100644
-index 0000000..0ece303
+index 0000000..623e2b5
 --- /dev/null
 +++ b/fs/unionfs/Makefile
 @@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.5.9.2 (for 3.0.0-rc4)"
++UNIONFS_VERSION="2.5.10 (for 3.1.0-rc4)"
 +
 +EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
 +
@@ -797,10 +797,10 @@
 +endif
 diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
 new file mode 100644
-index 0000000..0a271f4
+index 0000000..71cacfe
 --- /dev/null
 +++ b/fs/unionfs/commonfops.c
-@@ -0,0 +1,896 @@
+@@ -0,0 +1,901 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -1115,7 +1115,7 @@
 +	 * someone has copied up this file from underneath us, we also need
 +	 * to refresh things.
 +	 */
-+	if ((d_deleted(dentry) && dbstart(dentry) >= fbstart(file)) ||
++	if (d_deleted(dentry) ||
 +	    (sbgen <= fgen &&
 +	     dbstart(dentry) == fbstart(file) &&
 +	     unionfs_lower_file(file)))
@@ -1241,31 +1241,36 @@
 +}
 +
 +/* unionfs_open helper function: open a directory */
-+static int __open_dir(struct inode *inode, struct file *file)
++static int __open_dir(struct inode *inode, struct file *file,
++		      struct dentry *parent)
 +{
 +	struct dentry *lower_dentry;
 +	struct file *lower_file;
 +	int bindex, bstart, bend;
-+	struct vfsmount *mnt;
++	struct vfsmount *lower_mnt;
++	struct dentry *dentry = file->f_path.dentry;
 +
-+	bstart = fbstart(file) = dbstart(file->f_path.dentry);
-+	bend = fbend(file) = dbend(file->f_path.dentry);
++	bstart = fbstart(file) = dbstart(dentry);
++	bend = fbend(file) = dbend(dentry);
 +
 +	for (bindex = bstart; bindex <= bend; bindex++) {
 +		lower_dentry =
-+			unionfs_lower_dentry_idx(file->f_path.dentry, bindex);
++			unionfs_lower_dentry_idx(dentry, bindex);
 +		if (!lower_dentry)
 +			continue;
 +
 +		dget(lower_dentry);
-+		unionfs_mntget(file->f_path.dentry, bindex);
-+		mnt = unionfs_lower_mnt_idx(file->f_path.dentry, bindex);
-+		lower_file = dentry_open(lower_dentry, mnt, file->f_flags,
++		lower_mnt = unionfs_mntget(dentry, bindex);
++		if (!lower_mnt)
++			lower_mnt = unionfs_mntget(parent, bindex);
++		lower_file = dentry_open(lower_dentry, lower_mnt, file->f_flags,
 +					 current_cred());
 +		if (IS_ERR(lower_file))
 +			return PTR_ERR(lower_file);
 +
 +		unionfs_set_lower_file_idx(file, bindex, lower_file);
++		if (!unionfs_lower_mnt_idx(dentry, bindex))
++			unionfs_set_lower_mnt_idx(dentry, bindex, lower_mnt);
 +
 +		/*
 +		 * The branchget goes after the open, because otherwise
@@ -1285,18 +1290,20 @@
 +	struct file *lower_file;
 +	int lower_flags;
 +	int bindex, bstart, bend;
++	struct dentry *dentry = file->f_path.dentry;
++	struct vfsmount *lower_mnt;
 +
-+	lower_dentry = unionfs_lower_dentry(file->f_path.dentry);
++	lower_dentry = unionfs_lower_dentry(dentry);
 +	lower_flags = file->f_flags;
 +
-+	bstart = fbstart(file) = dbstart(file->f_path.dentry);
-+	bend = fbend(file) = dbend(file->f_path.dentry);
++	bstart = fbstart(file) = dbstart(dentry);
++	bend = fbend(file) = dbend(dentry);
 +
 +	/*
 +	 * check for the permission for lower file.  If the error is
 +	 * COPYUP_ERR, copyup the file.
 +	 */
-+	if (lower_dentry->d_inode && is_robranch(file->f_path.dentry)) {
++	if (lower_dentry->d_inode && is_robranch(dentry)) {
 +		/*
 +		 * if the open will change the file, copy it up otherwise
 +		 * defer it.
@@ -1331,11 +1338,9 @@
 +	 * dentry_open will decrement mnt refcnt if err.
 +	 * otherwise fput() will do an mntput() for us upon file close.
 +	 */
-+	unionfs_mntget(file->f_path.dentry, bstart);
-+	lower_file =
-+		dentry_open(lower_dentry,
-+			    unionfs_lower_mnt_idx(file->f_path.dentry, bstart),
-+			    lower_flags, current_cred());
++	lower_mnt = unionfs_mntget(dentry, bstart);
++	lower_file = dentry_open(lower_dentry, lower_mnt, lower_flags,
++				 current_cred());
 +	if (IS_ERR(lower_file))
 +		return PTR_ERR(lower_file);
 +
@@ -1404,7 +1409,7 @@
 +	 * these lower file structs
 +	 */
 +	if (S_ISDIR(inode->i_mode))
-+		err = __open_dir(inode, file);	/* open a dir */
++		err = __open_dir(inode, file, parent); /* open a dir */
 +	else
 +		err = __open_file(inode, file, parent);	/* open a file */
 +
@@ -1699,10 +1704,10 @@
 +}
 diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
 new file mode 100644
-index 0000000..37c2654
+index 0000000..078ca27
 --- /dev/null
 +++ b/fs/unionfs/copyup.c
-@@ -0,0 +1,896 @@
+@@ -0,0 +1,899 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -2030,8 +2035,11 @@
 +
 +	kfree(buf);
 +
++#if 0
++	/* XXX: code no longer needed? */
 +	if (!err)
 +		err = output_file->f_op->fsync(output_file, 0);
++#endif
 +
 +	if (err)
 +		goto out_close_out;
@@ -2601,10 +2609,10 @@
 +}
 diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
 new file mode 100644
-index 0000000..6092e69
+index 0000000..c07f697
 --- /dev/null
 +++ b/fs/unionfs/debug.c
-@@ -0,0 +1,548 @@
+@@ -0,0 +1,549 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
@@ -2969,12 +2977,13 @@
 +		pr_debug(" CF0: file/dentry=%p:%p fstart/end=%d:%d\n",
 +			 file, dentry, fstart, fend);
 +	}
-+	if (unlikely(fstart != dstart)) {
++	/* d_deleted dentries can be ignored for this test */
++	if (unlikely(fstart != dstart) && !d_deleted(dentry)) {
 +		PRINT_CALLER(fname, fxn, line);
 +		pr_debug(" CF1: file/dentry=%p:%p fstart=%d dstart=%d\n",
 +			 file, dentry, fstart, dstart);
 +	}
-+	if (unlikely(fend != dend)) {
++	if (unlikely(fend != dend) && !d_deleted(dentry)) {
 +		PRINT_CALLER(fname, fxn, line);
 +		pr_debug(" CF2: file/dentry=%p:%p fend=%d dend=%d\n",
 +			 file, dentry, fend, dend);
@@ -3155,10 +3164,10 @@
 +}
 diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
 new file mode 100644
-index 0000000..c0205a4
+index 0000000..1628dad
 --- /dev/null
 +++ b/fs/unionfs/dentry.c
-@@ -0,0 +1,406 @@
+@@ -0,0 +1,409 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -3476,12 +3485,15 @@
 +}
 +
 +static int unionfs_d_revalidate(struct dentry *dentry,
-+				struct nameidata *nd_unused)
++				struct nameidata *nd)
 +{
 +	bool valid = true;
 +	int err = 1;		/* 1 means valid for the VFS */
 +	struct dentry *parent;
 +
++	if (nd && nd->flags & LOOKUP_RCU)
++		return -ECHILD;
++
 +	unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD);
 +	parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT);
 +	unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
@@ -4452,10 +4464,10 @@
 +#endif	/* not _FANOUT_H */
 diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
 new file mode 100644
-index 0000000..416c52f
+index 0000000..f583c8f
 --- /dev/null
 +++ b/fs/unionfs/file.c
-@@ -0,0 +1,382 @@
+@@ -0,0 +1,386 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -4646,7 +4658,7 @@
 +	return err;
 +}
 +
-+int unionfs_fsync(struct file *file, int datasync)
++int unionfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 +{
 +	int bindex, bstart, bend;
 +	struct file *lower_file;
@@ -4656,6 +4668,7 @@
 +	struct inode *lower_inode, *inode;
 +	int err = -EINVAL;
 +
++	lockdep_off();
 +	unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT);
 +	parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT);
 +	unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
@@ -4665,6 +4678,10 @@
 +		goto out;
 +	unionfs_check_file(file);
 +
++	err = generic_file_fsync(file, start, end, datasync);
++	if (err)
++		goto out;
++
 +	bstart = fbstart(file);
 +	bend = fbend(file);
 +	if (bstart < 0 || bend < 0)
@@ -4682,11 +4699,9 @@
 +			continue;
 +		lower_file = unionfs_lower_file_idx(file, bindex);
 +		lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
-+		mutex_lock(&lower_inode->i_mutex);
-+		err = lower_inode->i_fop->fsync(lower_file, datasync);
++		err = vfs_fsync_range(lower_file, start, end, datasync);
 +		if (!err && bindex == bstart)
 +			fsstack_copy_attr_times(inode, lower_inode);
-+		mutex_unlock(&lower_inode->i_mutex);
 +		if (err)
 +			goto out;
 +	}
@@ -4697,6 +4712,7 @@
 +	unionfs_unlock_dentry(dentry);
 +	unionfs_unlock_parent(dentry, parent);
 +	unionfs_read_unlock(dentry->d_sb);
++	lockdep_on();
 +	return err;
 +}
 +
@@ -4840,10 +4856,10 @@
 +};
 diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
 new file mode 100644
-index 0000000..b207c13
+index 0000000..83cb681
 --- /dev/null
 +++ b/fs/unionfs/inode.c
-@@ -0,0 +1,1099 @@
+@@ -0,0 +1,1084 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -5589,7 +5605,7 @@
 + * This is a variant of fs/namei.c:permission() or inode_permission() which
 + * skips over EROFS tests (because we perform copyup on EROFS).
 + */
-+static int __inode_permission(struct inode *inode, int mask, unsigned int flags)
++static int __inode_permission(struct inode *inode, int mask)
 +{
 +	int retval;
 +
@@ -5599,7 +5615,7 @@
 +
 +	/* Ordinary permission routines do not understand MAY_APPEND. */
 +	if (inode->i_op && inode->i_op->permission) {
-+		retval = inode->i_op->permission(inode, mask, flags);
++		retval = inode->i_op->permission(inode, mask);
 +		if (!retval) {
 +			/*
 +			 * Exec permission on a regular file is denied if none
@@ -5613,7 +5629,7 @@
 +				return -EACCES;
 +		}
 +	} else {
-+		retval = generic_permission(inode, mask, flags, NULL);
++		retval = generic_permission(inode, mask);
 +	}
 +	if (retval)
 +		return retval;
@@ -5630,7 +5646,7 @@
 + * unionfs_permission, or anything it calls, will use stale branch
 + * information.
 + */
-+static int unionfs_permission(struct inode *inode, int mask, unsigned int flags)
++static int unionfs_permission(struct inode *inode, int mask)
 +{
 +	struct inode *lower_inode = NULL;
 +	int err = 0;
@@ -5638,16 +5654,6 @@
 +	int is_file;
 +	const int write_mask = (mask & MAY_WRITE) && !(mask & MAY_READ);
 +	struct inode *inode_grabbed;
-+	struct dentry *dentry;
-+
-+	if (flags & IPERM_FLAG_RCU) {
-+		err = -ECHILD;
-+		goto out_nograb;
-+	}
-+
-+	dentry = d_find_alias(inode);
-+	if (dentry)
-+		unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
 +
 +	inode_grabbed = igrab(inode);
 +	is_file = !S_ISDIR(inode->i_mode);
@@ -5692,7 +5698,7 @@
 +		 * copyup taking place later on.  However, if user never had
 +		 * access to the file, then no copyup could ever take place.
 +		 */
-+		err = __inode_permission(lower_inode, mask, flags);
++		err = __inode_permission(lower_inode, mask);
 +		if (err && err != -EACCES && err != EPERM && bindex > 0) {
 +			umode_t mode = lower_inode->i_mode;
 +			if ((is_robranch_super(inode->i_sb, bindex) ||
@@ -5715,7 +5721,7 @@
 +		if (err && err == -EACCES &&
 +		    is_robranch_super(inode->i_sb, bindex) &&
 +		    lower_inode->i_sb->s_magic == NFS_SUPER_MAGIC)
-+			err = generic_permission(lower_inode, mask, flags, NULL);
++			err = generic_permission(lower_inode, mask);
 +
 +		/*
 +		 * The permissions are an intersection of the overall directory
@@ -5739,12 +5745,7 @@
 +
 +out:
 +	unionfs_check_inode(inode);
-+	if (dentry) {
-+		unionfs_unlock_dentry(dentry);
-+		dput(dentry);
-+	}
 +	iput(inode_grabbed);
-+out_nograb:
 +	return err;
 +}
 +
@@ -5945,10 +5946,10 @@
 +};
 diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
 new file mode 100644
-index 0000000..3cbde56
+index 0000000..041d674
 --- /dev/null
 +++ b/fs/unionfs/lookup.c
-@@ -0,0 +1,569 @@
+@@ -0,0 +1,570 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -5981,17 +5982,17 @@
 +			    const char *name, struct vfsmount **new_mnt)
 +{
 +	struct dentry *dentry = NULL;
-+	struct nameidata lower_nd;
++	struct path lower_path = {NULL, NULL};
 +	int err;
 +
 +	/* we use flags=0 to get basic lookup */
-+	err = vfs_path_lookup(base, mnt, name, 0, &lower_nd);
++	err = vfs_path_lookup(base, mnt, name, 0, &lower_path);
 +
 +	switch (err) {
 +	case 0: /* no error */
-+		dentry = lower_nd.path.dentry;
++		dentry = lower_path.dentry;
 +		if (new_mnt)
-+			*new_mnt = lower_nd.path.mnt; /* rc already inc'ed */
++			*new_mnt = lower_path.mnt; /* rc already inc'ed */
 +		break;
 +	case -ENOENT:
 +		 /*
@@ -6003,7 +6004,7 @@
 +		  */
 +		dentry = lookup_lck_len(name, base, strlen(name));
 +		if (new_mnt)
-+			*new_mnt = mntget(lower_nd.path.mnt);
++			*new_mnt = mntget(lower_path.mnt);
 +		break;
 +	default: /* all other real errors */
 +		dentry = ERR_PTR(err);
@@ -6262,7 +6263,8 @@
 +	verify_locked(parent);
 +
 +	/* must initialize dentry operations */
-+	dentry->d_op = &unionfs_dops;
++	if (lookupmode == INTERPOSE_LOOKUP)
++		d_set_d_op(dentry, &unionfs_dops);
 +
 +	/* We never partial lookup the root directory. */
 +	if (IS_ROOT(dentry))
@@ -6520,10 +6522,10 @@
 +}
 diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
 new file mode 100644
-index 0000000..fa52f61
+index 0000000..87cd1fc
 --- /dev/null
 +++ b/fs/unionfs/main.c
-@@ -0,0 +1,763 @@
+@@ -0,0 +1,752 @@
 +/*
 + * Copyright (c) 2003-2011 Erez Zadok
 + * Copyright (c) 2003-2006 Charles P. Wright
@@ -6671,7 +6673,7 @@
 +			 * properly.  Finally we must return this new
 +			 * dentry.
 +			 */
-+			spliced->d_op = &unionfs_dops;
++			d_set_d_op(spliced, &unionfs_dops);
 +			spliced->d_fsdata = dentry->d_fsdata;
 +			dentry->d_fsdata = NULL;
 +			dentry = spliced;
@@ -7052,32 +7054,6 @@
 +}
 +
 +/*
-+ * our custom d_alloc_root work-alike
-+ *
-+ * we can't use d_alloc_root if we want to use our own interpose function
-+ * unchanged, so we simply call our own "fake" d_alloc_root
-+ */
-+static struct dentry *unionfs_d_alloc_root(struct super_block *sb)
-+{
-+	struct dentry *ret = NULL;
-+
-+	if (sb) {
-+		static const struct qstr name = {
-+			.name = "/",
-+			.len = 1
-+		};
-+
-+		ret = d_alloc(NULL, &name);
-+		if (likely(ret)) {
-+			ret->d_op = &unionfs_dops;
-+			ret->d_sb = sb;
-+			ret->d_parent = ret;
-+		}
-+	}
-+	return ret;
-+}
-+
-+/*
 + * There is no need to lock the unionfs_super_info's rwsem as there is no
 + * way anyone can have a reference to the superblock at this point in time.
 + */
@@ -7087,6 +7063,7 @@
 +	int err = 0;
 +	struct unionfs_dentry_info *lower_root_info = NULL;
 +	int bindex, bstart, bend;
++	struct inode *inode = NULL;
 +
 +	if (!raw_data) {
 +		printk(KERN_ERR
@@ -7144,12 +7121,18 @@
 +
 +	sb->s_op = &unionfs_sops;
 +
-+	/* See comment next to the definition of unionfs_d_alloc_root */
-+	sb->s_root = unionfs_d_alloc_root(sb);
++	/* get a new inode and allocate our root dentry */
++	inode = unionfs_iget(sb, iunique(sb, UNIONFS_ROOT_INO));
++	if (IS_ERR(inode)) {
++		err = PTR_ERR(inode);
++		goto out_dput;
++	}
++	sb->s_root = d_alloc_root(inode);
 +	if (unlikely(!sb->s_root)) {
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-unionfs.patch?r1=1.14&r2=1.15&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.989&r2=1.990&f=u



More information about the pld-cvs-commit mailing list