summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/unionfs/Unionfs-update-show_options-prototype.patch33
-rw-r--r--features/unionfs/Unionfs-use-mode_t.patch48
-rw-r--r--features/unionfs/unionfs-change-end_writeback-to-clear_inode.patch30
-rw-r--r--features/unionfs/unionfs-introduce-unionfs-2.5.11-core-support.patch (renamed from features/unionfs/unionfs-introduce-unionfs-2.5.10-core-support.patch)203
-rw-r--r--features/unionfs/unionfs-replace-d_alloc_root-with-d_make_root.patch10
-rw-r--r--features/unionfs/unionfs-restore-FD_-utility-defines.patch8
-rw-r--r--features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch8
-rw-r--r--features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch130
-rw-r--r--features/unionfs/unionfs-v3.4-build-fixups.patch8
-rw-r--r--features/unionfs/unionfs.scc6
10 files changed, 160 insertions, 324 deletions
diff --git a/features/unionfs/Unionfs-update-show_options-prototype.patch b/features/unionfs/Unionfs-update-show_options-prototype.patch
deleted file mode 100644
index 38b286ae..00000000
--- a/features/unionfs/Unionfs-update-show_options-prototype.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 95c79fb2f965f1feb33bffe46c20ddb0b8e9da0d Mon Sep 17 00:00:00 2001
-From: Erez Zadok <ezk@cs.sunysb.edu>
-Date: Fri, 10 Feb 2012 15:36:44 -0500
-Subject: [PATCH] Unionfs: update ->show_options prototype
-
-commit a34b0868fc27524af46ec861de4d85ae07b63ccb from unionfs
-upstream - git://git.fsl.cs.sunysb.edu/unionfs-latest.git
-
-Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
-Signed-off-by: Liang Li <liang.li@windriver.com>
----
- fs/unionfs/super.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
-index c3ac814..b99f14d 100644
---- a/fs/unionfs/super.c
-+++ b/fs/unionfs/super.c
-@@ -965,9 +965,9 @@ static void unionfs_umount_begin(struct super_block *sb)
- unionfs_read_unlock(sb);
- }
-
--static int unionfs_show_options(struct seq_file *m, struct vfsmount *mnt)
-+static int unionfs_show_options(struct seq_file *m, struct dentry *root)
- {
-- struct super_block *sb = mnt->mnt_sb;
-+ struct super_block *sb = root->d_sb;
- int ret = 0;
- char *tmp_page;
- char *path;
---
-1.7.5.4
-
diff --git a/features/unionfs/Unionfs-use-mode_t.patch b/features/unionfs/Unionfs-use-mode_t.patch
deleted file mode 100644
index 85dbe2f8..00000000
--- a/features/unionfs/Unionfs-use-mode_t.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 2d875e834b4b65761002f5fd28f26867a4b70c57 Mon Sep 17 00:00:00 2001
-From: Erez Zadok <ezk@cs.sunysb.edu>
-Date: Fri, 10 Feb 2012 15:36:36 -0500
-Subject: [PATCH] Unionfs: use mode_t
-
-commit dba53016f577 from unionfs upstream
-git://git.fsl.cs.sunysb.edu/unionfs-latest.git
-
-Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
-Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
----
- fs/unionfs/inode.c | 6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
-index f016860..c09eb6d 100644
---- a/fs/unionfs/inode.c
-+++ b/fs/unionfs/inode.c
-@@ -97,7 +97,7 @@ out:
- }
-
- static int unionfs_create(struct inode *dir, struct dentry *dentry,
-- int mode, struct nameidata *nd_unused)
-+ umode_t mode, struct nameidata *nd_unused)
- {
- int err = 0;
- struct dentry *lower_dentry = NULL;
-@@ -423,7 +423,7 @@ out:
- return err;
- }
-
--static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
-+static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
- {
- int err = 0;
- struct dentry *lower_dentry = NULL;
-@@ -547,7 +547,7 @@ out:
- return err;
- }
-
--static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
-+static int unionfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
- dev_t dev)
- {
- int err = 0;
---
-1.7.5.4
-
diff --git a/features/unionfs/unionfs-change-end_writeback-to-clear_inode.patch b/features/unionfs/unionfs-change-end_writeback-to-clear_inode.patch
deleted file mode 100644
index 7c2fe71f..00000000
--- a/features/unionfs/unionfs-change-end_writeback-to-clear_inode.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 33391902abeec66c50b43cfda3da5693a412cb09 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Wed, 20 Jun 2012 21:59:20 -0400
-Subject: [PATCH] unionfs: change end_writeback to clear_inode
-
-commit: dbd5768f vfs: Rename end_writeback() to clear_inode()
-was merged in 3.5-rc1, so unionfs must be updated to the new naming
-scheme.
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- fs/unionfs/super.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
-index c3ac814..9cb0551 100644
---- a/fs/unionfs/super.c
-+++ b/fs/unionfs/super.c
-@@ -835,7 +835,7 @@ static void unionfs_evict_inode(struct inode *inode)
- struct unionfs_dir_state *rdstate;
-
- truncate_inode_pages(&inode->i_data, 0);
-- end_writeback(inode);
-+ clear_inode(inode);
-
- list_for_each_safe(pos, n, &UNIONFS_I(inode)->readdircache) {
- rdstate = list_entry(pos, struct unionfs_dir_state, cache);
---
-1.7.5.4
-
diff --git a/features/unionfs/unionfs-introduce-unionfs-2.5.10-core-support.patch b/features/unionfs/unionfs-introduce-unionfs-2.5.11-core-support.patch
index c2bf188b..dc086915 100644
--- a/features/unionfs/unionfs-introduce-unionfs-2.5.10-core-support.patch
+++ b/features/unionfs/unionfs-introduce-unionfs-2.5.11-core-support.patch
@@ -1,11 +1,86 @@
-From 3def66d1097fc5a010dd0c1ab7837f79bada46d9 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Fri, 27 Jan 2012 09:50:57 -0500
-Subject: [PATCH] unionfs: introduce unionfs 2.5.10 core support
+From 1a212030e788ce3f6412198127e545f95b909eb4 Mon Sep 17 00:00:00 2001
+From: Yang Shi <yang.shi@windriver.com>
+Date: Wed, 28 Nov 2012 10:44:35 -0800
+Subject: [PATCH 1/5] unionfs: introduce unionfs 2.5.11 core support
upstream: http://download.filesystems.org/unionfs/unionfs-2.x-latest/
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+Signed-off-by: Yang Shi <yang.shi@windriver.com>
+---
+ Documentation/filesystems/00-INDEX | 2 +
+ Documentation/filesystems/unionfs/00-INDEX | 10 +
+ Documentation/filesystems/unionfs/concepts.txt | 287 +++++++
+ Documentation/filesystems/unionfs/issues.txt | 28 +
+ Documentation/filesystems/unionfs/rename.txt | 31 +
+ Documentation/filesystems/unionfs/usage.txt | 134 +++
+ MAINTAINERS | 8 +
+ fs/Kconfig | 1 +
+ fs/Makefile | 1 +
+ fs/namei.c | 38 +
+ fs/splice.c | 22 +-
+ fs/stack.c | 14 +-
+ fs/unionfs/Kconfig | 24 +
+ fs/unionfs/Makefile | 17 +
+ fs/unionfs/commonfops.c | 901 ++++++++++++++++++++
+ fs/unionfs/copyup.c | 899 ++++++++++++++++++++
+ fs/unionfs/debug.c | 551 ++++++++++++
+ fs/unionfs/dentry.c | 409 +++++++++
+ fs/unionfs/dirfops.c | 302 +++++++
+ fs/unionfs/dirhelper.c | 158 ++++
+ fs/unionfs/fanout.h | 407 +++++++++
+ fs/unionfs/file.c | 386 +++++++++
+ fs/unionfs/inode.c | 1085 ++++++++++++++++++++++++
+ fs/unionfs/lookup.c | 570 +++++++++++++
+ fs/unionfs/main.c | 752 ++++++++++++++++
+ fs/unionfs/mmap.c | 89 ++
+ fs/unionfs/rdstate.c | 285 +++++++
+ fs/unionfs/rename.c | 522 ++++++++++++
+ fs/unionfs/sioq.c | 101 +++
+ fs/unionfs/sioq.h | 91 ++
+ fs/unionfs/subr.c | 95 +++
+ fs/unionfs/super.c | 1030 ++++++++++++++++++++++
+ fs/unionfs/union.h | 681 +++++++++++++++
+ fs/unionfs/unlink.c | 278 ++++++
+ fs/unionfs/whiteout.c | 601 +++++++++++++
+ fs/unionfs/xattr.c | 173 ++++
+ include/linux/fs_stack.h | 14 +-
+ include/linux/magic.h | 2 +
+ include/linux/namei.h | 3 +
+ include/linux/splice.h | 5 +
+ include/linux/union_fs.h | 22 +
+ security/security.c | 1 +
+ 42 files changed, 11018 insertions(+), 12 deletions(-)
+ create mode 100644 Documentation/filesystems/unionfs/00-INDEX
+ create mode 100644 Documentation/filesystems/unionfs/concepts.txt
+ create mode 100644 Documentation/filesystems/unionfs/issues.txt
+ create mode 100644 Documentation/filesystems/unionfs/rename.txt
+ create mode 100644 Documentation/filesystems/unionfs/usage.txt
+ create mode 100644 fs/unionfs/Kconfig
+ create mode 100644 fs/unionfs/Makefile
+ create mode 100644 fs/unionfs/commonfops.c
+ create mode 100644 fs/unionfs/copyup.c
+ create mode 100644 fs/unionfs/debug.c
+ create mode 100644 fs/unionfs/dentry.c
+ create mode 100644 fs/unionfs/dirfops.c
+ create mode 100644 fs/unionfs/dirhelper.c
+ create mode 100644 fs/unionfs/fanout.h
+ create mode 100644 fs/unionfs/file.c
+ create mode 100644 fs/unionfs/inode.c
+ create mode 100644 fs/unionfs/lookup.c
+ create mode 100644 fs/unionfs/main.c
+ create mode 100644 fs/unionfs/mmap.c
+ create mode 100644 fs/unionfs/rdstate.c
+ create mode 100644 fs/unionfs/rename.c
+ create mode 100644 fs/unionfs/sioq.c
+ create mode 100644 fs/unionfs/sioq.h
+ create mode 100644 fs/unionfs/subr.c
+ create mode 100644 fs/unionfs/super.c
+ create mode 100644 fs/unionfs/union.h
+ create mode 100644 fs/unionfs/unlink.c
+ create mode 100644 fs/unionfs/whiteout.c
+ create mode 100644 fs/unionfs/xattr.c
+ create mode 100644 include/linux/union_fs.h
+
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index 8c624a1..4aa288b 100644
--- a/Documentation/filesystems/00-INDEX
@@ -540,12 +615,12 @@ index 0000000..1adde69
+
+For more information, see <http://unionfs.filesystems.org/>.
diff --git a/MAINTAINERS b/MAINTAINERS
-index fdc0119..91cc98a 100644
+index a60009d..ed879dc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -7065,6 +7065,14 @@ S: Supported
- F: Documentation/scsi/ufs.txt
- F: drivers/scsi/ufs/
+@@ -6883,6 +6883,14 @@ F: Documentation/cdrom/
+ F: drivers/cdrom/cdrom.c
+ F: include/linux/cdrom.h
+UNIONFS
+P: Erez Zadok
@@ -583,19 +658,19 @@ index 79b94eb..d094e94 100644
obj-$(CONFIG_NFS_FS) += nfs/
obj-$(CONFIG_EXPORTFS) += exportfs/
diff --git a/fs/namei.c b/fs/namei.c
-index dd1ed1b..5e71f1b 100644
+index c427919..de81292 100644
--- a/fs/namei.c
+++ b/fs/namei.c
-@@ -506,6 +506,7 @@ err_root:
- spin_unlock(&fs->lock);
- return -ECHILD;
+@@ -491,6 +491,7 @@ void release_open_intent(struct nameidata *nd)
+ fput(file);
+ }
}
+EXPORT_SYMBOL_GPL(release_open_intent);
- static inline int d_revalidate(struct dentry *dentry, unsigned int flags)
+ static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd)
{
-@@ -2098,6 +2099,42 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
- return __lookup_hash(&this, base, 0);
+@@ -1883,6 +1884,42 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
+ return __lookup_hash(&this, base, NULL);
}
+/* pass nameidata from caller (useful for NFS) */
@@ -637,7 +712,7 @@ index dd1ed1b..5e71f1b 100644
int user_path_at_empty(int dfd, const char __user *name, unsigned flags,
struct path *path, int *empty)
{
-@@ -3975,6 +4012,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
+@@ -3476,6 +3513,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
EXPORT_SYMBOL(getname);
EXPORT_SYMBOL(lock_rename);
EXPORT_SYMBOL(lookup_one_len);
@@ -646,10 +721,10 @@ index dd1ed1b..5e71f1b 100644
EXPORT_SYMBOL(page_put_link);
EXPORT_SYMBOL(page_readlink);
diff --git a/fs/splice.c b/fs/splice.c
-index 41514dd..aae192a 100644
+index 5cac690..712af33 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1088,8 +1088,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@@ -660,7 +735,7 @@ index 41514dd..aae192a 100644
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -1117,13 +1117,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1112,13 +1112,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
@@ -678,7 +753,7 @@ index 41514dd..aae192a 100644
{
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
-@@ -1143,6 +1144,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1138,6 +1139,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@@ -686,7 +761,7 @@ index 41514dd..aae192a 100644
/**
* splice_direct_to_actor - splices data directly between two non-pipes
-@@ -1212,7 +1214,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+@@ -1207,7 +1209,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;
@@ -695,7 +770,7 @@ index 41514dd..aae192a 100644
if (unlikely(ret <= 0))
goto out_release;
-@@ -1271,8 +1273,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
+@@ -1266,8 +1268,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
{
struct file *file = sd->u.file;
@@ -706,7 +781,7 @@ index 41514dd..aae192a 100644
}
/**
-@@ -1357,7 +1359,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1352,7 +1354,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &out->f_pos;
@@ -715,7 +790,7 @@ index 41514dd..aae192a 100644
if (off_out && copy_to_user(off_out, off, sizeof(loff_t)))
ret = -EFAULT;
-@@ -1377,7 +1379,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1372,7 +1374,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &in->f_pos;
@@ -782,11 +857,11 @@ index 0000000..f3c1ac4
+ 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..623e2b5
+index 0000000..60b6060
--- /dev/null
+++ b/fs/unionfs/Makefile
@@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.5.10 (for 3.1.0-rc4)"
++UNIONFS_VERSION="2.5.11 (for 3.3.0-rc3)"
+
+EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
+
@@ -2617,10 +2692,10 @@ index 0000000..078ca27
+}
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
new file mode 100644
-index 0000000..c07f697
+index 0000000..21ce90c
--- /dev/null
+++ b/fs/unionfs/debug.c
-@@ -0,0 +1,549 @@
+@@ -0,0 +1,551 @@
+/*
+ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
@@ -2633,6 +2708,7 @@ index 0000000..c07f697
+ */
+
+#include "union.h"
++#include "../mount.h"
+
+/*
+ * Helper debugging functions for maintainers (and for users to report back
@@ -3068,17 +3144,18 @@ index 0000000..c07f697
+
+static unsigned int __mnt_get_count(struct vfsmount *mnt)
+{
++ struct mount *m = real_mount(mnt);
+#ifdef CONFIG_SMP
+ unsigned int count = 0;
+ int cpu;
+
+ for_each_possible_cpu(cpu) {
-+ count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_count;
++ count += per_cpu_ptr(m->mnt_pcp, cpu)->mnt_count;
+ }
+
+ return count;
+#else
-+ return mnt->mnt_count;
++ return m->mnt_count;
+#endif
+}
+
@@ -4864,10 +4941,10 @@ index 0000000..f583c8f
+};
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
new file mode 100644
-index 0000000..83cb681
+index 0000000..dd522c2
--- /dev/null
+++ b/fs/unionfs/inode.c
-@@ -0,0 +1,1084 @@
+@@ -0,0 +1,1085 @@
+/*
+ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -4967,7 +5044,7 @@ index 0000000..83cb681
+}
+
+static int unionfs_create(struct inode *dir, struct dentry *dentry,
-+ int mode, struct nameidata *nd_unused)
++ umode_t mode, struct nameidata *nd_unused)
+{
+ int err = 0;
+ struct dentry *lower_dentry = NULL;
@@ -5012,7 +5089,7 @@ index 0000000..83cb681
+ fsstack_copy_inode_size(dir,
+ lower_parent_dentry->d_inode);
+ /* update no. of links on parent directory */
-+ dir->i_nlink = unionfs_get_nlinks(dir);
++ set_nlink(dir, unionfs_get_nlinks(dir));
+ }
+ }
+
@@ -5123,7 +5200,7 @@ index 0000000..83cb681
+ lower_dir_dentry = dget_parent(lower_new_dentry);
+ fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
+ dput(lower_dir_dentry);
-+ dir->i_nlink = unionfs_get_nlinks(dir);
++ set_nlink(dir, unionfs_get_nlinks(dir));
+ err = 0;
+ }
+ if (err)
@@ -5198,7 +5275,8 @@ index 0000000..83cb681
+ fsstack_copy_inode_size(dir, lower_new_dentry->d_parent->d_inode);
+
+ /* propagate number of hard-links */
-+ old_dentry->d_inode->i_nlink = unionfs_get_nlinks(old_dentry->d_inode);
++ set_nlink(old_dentry->d_inode,
++ unionfs_get_nlinks(old_dentry->d_inode));
+ /* new dentry's ctime may have changed due to hard-link counts */
+ unionfs_copy_attr_times(new_dentry->d_inode);
+
@@ -5272,7 +5350,7 @@ index 0000000..83cb681
+ fsstack_copy_inode_size(dir,
+ lower_parent_dentry->d_inode);
+ /* update no. of links on parent directory */
-+ dir->i_nlink = unionfs_get_nlinks(dir);
++ set_nlink(dir, unionfs_get_nlinks(dir));
+ }
+ }
+
@@ -5293,7 +5371,7 @@ index 0000000..83cb681
+ return err;
+}
+
-+static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
++static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
+{
+ int err = 0;
+ struct dentry *lower_dentry = NULL;
@@ -5384,7 +5462,7 @@ index 0000000..83cb681
+ lower_parent_dentry->d_inode);
+
+ /* update number of links on parent directory */
-+ dir->i_nlink = unionfs_get_nlinks(dir);
++ set_nlink(dir, unionfs_get_nlinks(dir));
+ }
+
+ err = make_dir_opaque(dentry, dbstart(dentry));
@@ -5417,7 +5495,7 @@ index 0000000..83cb681
+ return err;
+}
+
-+static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
++static int unionfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
+ dev_t dev)
+{
+ int err = 0;
@@ -5464,7 +5542,7 @@ index 0000000..83cb681
+ fsstack_copy_inode_size(dir,
+ lower_parent_dentry->d_inode);
+ /* update no. of links on parent directory */
-+ dir->i_nlink = unionfs_get_nlinks(dir);
++ set_nlink(dir, unionfs_get_nlinks(dir));
+ }
+ }
+
@@ -6530,7 +6608,7 @@ index 0000000..041d674
+}
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
new file mode 100644
-index 0000000..87cd1fc
+index 0000000..ee78f1d
--- /dev/null
+++ b/fs/unionfs/main.c
@@ -0,0 +1,752 @@
@@ -7225,7 +7303,7 @@ index 0000000..87cd1fc
+ struct dentry *dentry;
+
+ dentry = mount_nodev(fs_type, flags, raw_data, unionfs_read_super);
-+ if (!PTR_ERR(dentry))
++ if (!IS_ERR(dentry))
+ UNIONFS_SB(dentry->d_sb)->dev_name =
+ kstrdup(dev_name, GFP_KERNEL);
+ return dentry;
@@ -7674,7 +7752,7 @@ index 0000000..59b7333
+}
diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c
new file mode 100644
-index 0000000..c8ab910
+index 0000000..ce85b84
--- /dev/null
+++ b/fs/unionfs/rename.c
@@ -0,0 +1,522 @@
@@ -7892,8 +7970,8 @@ index 0000000..c8ab910
+ fsstack_copy_attr_times(new_parent->d_inode,
+ unlink_dir_dentry->d_inode);
+ /* propagate number of hard-links */
-+ new_parent->d_inode->i_nlink =
-+ unionfs_get_nlinks(new_parent->d_inode);
++ set_nlink(new_parent->d_inode,
++ unionfs_get_nlinks(new_parent->d_inode));
+
+ unlock_dir(unlink_dir_dentry);
+ if (!err) {
@@ -8406,7 +8484,7 @@ index 0000000..c2dfb94
+#endif /* not _SIOQ_H */
diff --git a/fs/unionfs/subr.c b/fs/unionfs/subr.c
new file mode 100644
-index 0000000..bdca2f7
+index 0000000..e7fc5a5
--- /dev/null
+++ b/fs/unionfs/subr.c
@@ -0,0 +1,95 @@
@@ -8503,11 +8581,11 @@ index 0000000..bdca2f7
+ * Update the nlinks AFTER updating the above fields, because the
+ * get_links callback may depend on them.
+ */
-+ dest->i_nlink = unionfs_get_nlinks(dest);
++ set_nlink(dest, unionfs_get_nlinks(dest));
+}
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
new file mode 100644
-index 0000000..c3ac814
+index 0000000..b99f14d
--- /dev/null
+++ b/fs/unionfs/super.c
@@ -0,0 +1,1030 @@
@@ -9478,9 +9556,9 @@ index 0000000..c3ac814
+ unionfs_read_unlock(sb);
+}
+
-+static int unionfs_show_options(struct seq_file *m, struct vfsmount *mnt)
++static int unionfs_show_options(struct seq_file *m, struct dentry *root)
+{
-+ struct super_block *sb = mnt->mnt_sb;
++ struct super_block *sb = root->d_sb;
+ int ret = 0;
+ char *tmp_page;
+ char *path;
@@ -10230,7 +10308,7 @@ index 0000000..8e7fcfb
+#endif /* not _UNION_H_ */
diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
new file mode 100644
-index 0000000..bf447bb
+index 0000000..25943a5
--- /dev/null
+++ b/fs/unionfs/unlink.c
@@ -0,0 +1,278 @@
@@ -10426,7 +10504,7 @@ index 0000000..bf447bb
+
+ fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
+ /* propagate number of hard-links */
-+ dentry->d_inode->i_nlink = unionfs_get_nlinks(dentry->d_inode);
++ set_nlink(dentry->d_inode, unionfs_get_nlinks(dentry->d_inode));
+
+out:
+ if (lower_dir_dentry)
@@ -11337,13 +11415,13 @@ index e15192c..1d7370b 100644
#define CGROUP_SUPER_MAGIC 0x27e0eb
diff --git a/include/linux/namei.h b/include/linux/namei.h
-index 4bf19d8..d9d775c 100644
+index ffc0213..99802c3 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
-@@ -71,8 +71,11 @@ extern void done_path_create(struct path *, struct dentry *);
- extern struct dentry *kern_path_locked(const char *, struct path *);
- extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
- const char *, unsigned int, struct path *);
+@@ -84,8 +84,11 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
+
+ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
+ int (*open)(struct inode *, struct file *));
+extern void release_open_intent(struct nameidata *);
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
@@ -11397,10 +11475,10 @@ index 0000000..c84d97e
+#endif /* _LINUX_UNIONFS_H */
+
diff --git a/security/security.c b/security/security.c
-index 860aeb3..efe2b05 100644
+index bf619ff..57742c6 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -530,6 +530,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -526,6 +526,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
@@ -11408,3 +11486,6 @@ index 860aeb3..efe2b05 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
+--
+1.7.10.4
+
diff --git a/features/unionfs/unionfs-replace-d_alloc_root-with-d_make_root.patch b/features/unionfs/unionfs-replace-d_alloc_root-with-d_make_root.patch
index fe49c602..cc32137b 100644
--- a/features/unionfs/unionfs-replace-d_alloc_root-with-d_make_root.patch
+++ b/features/unionfs/unionfs-replace-d_alloc_root-with-d_make_root.patch
@@ -1,17 +1,17 @@
-From 0310ad586c23871802aabff360c54505f62ea56f Mon Sep 17 00:00:00 2001
+From e408aad075b70f35b882667afeb1ccc96e38df77 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Thu, 29 Mar 2012 16:09:45 -0400
-Subject: [PATCH] unionfs: replace d_alloc_root with d_make_root
+Subject: [PATCH 2/5] unionfs: replace d_alloc_root with d_make_root
d_alloc_root has been removed, updating to the replacement d_make_root
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
fs/unionfs/main.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
-index 87cd1fc..fb18ef4 100644
+index ee78f1d..0077ebe 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -599,7 +599,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
@@ -33,5 +33,5 @@ index 87cd1fc..fb18ef4 100644
*/
d_rehash(sb->s_root);
--
-1.7.5.4
+1.7.10.4
diff --git a/features/unionfs/unionfs-restore-FD_-utility-defines.patch b/features/unionfs/unionfs-restore-FD_-utility-defines.patch
index 4a5fd861..8dd4e686 100644
--- a/features/unionfs/unionfs-restore-FD_-utility-defines.patch
+++ b/features/unionfs/unionfs-restore-FD_-utility-defines.patch
@@ -1,7 +1,7 @@
-From 88ed4b4c4b921041c1b387cac3f64c3b2fe60c35 Mon Sep 17 00:00:00 2001
+From 6ca221704dac6f9a267f8846ec2cc514de5c8b67 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Tue, 21 Aug 2012 22:14:49 -0400
-Subject: [PATCH] unionfs: restore FD_* utility defines
+Subject: [PATCH 5/5] unionfs: restore FD_* utility defines
commit 27cd8f513 [posix_types.h: Cleanup stale __NFDBITS and related definition]
removes the defintions for:
@@ -20,7 +20,7 @@ by unionfs until full replacements are found.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
fs/unionfs/union.h | 9 +++++++++
- 1 files changed, 9 insertions(+), 0 deletions(-)
+ 1 file changed, 9 insertions(+)
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 2d80523..b0c488e 100644
@@ -43,5 +43,5 @@ index 2d80523..b0c488e 100644
{
__set_bit(__fd, __fdsetp->fds_bits);
--
-1.7.5.4
+1.7.10.4
diff --git a/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch b/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch
index 3bc691b1..73fafd40 100644
--- a/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch
+++ b/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch
@@ -1,7 +1,7 @@
-From 9f0fe583ffc5116584d8c4800a7fa28bb4ff9b09 Mon Sep 17 00:00:00 2001
+From be59c0838d25c4a51951070ee236f064af538b97 Mon Sep 17 00:00:00 2001
From: Liang Li <liang.li@windriver.com>
Date: Thu, 16 Aug 2012 21:25:01 +0800
-Subject: [PATCH] unionfs: update unionfs fork to align with mainline
+Subject: [PATCH 4/5] unionfs: update unionfs fork to align with mainline
mainline commit 0145acc [vfs: uninline full_name_hash] changes the
interface to full_name_hash, so unionfs fork must be updated.
@@ -17,7 +17,7 @@ adopted fast hash function might have hash collision issue on x86.
Signed-off-by: Liang Li <liang.li@windriver.com>
---
fs/namei.c | 6 ++----
- 1 files changed, 2 insertions(+), 4 deletions(-)
+ 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index de81292..afb6cc8 100644
@@ -49,5 +49,5 @@ index de81292..afb6cc8 100644
* See if the low-level filesystem might want
* to use its own hash..
--
-1.7.5.4
+1.7.10.4
diff --git a/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch b/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch
deleted file mode 100644
index 937a93f6..00000000
--- a/features/unionfs/unionfs-use-proper-accessors-for-i_nlink.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 097ce909145fbf5998e12caa68c6641f15fc8718 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Fri, 27 Jan 2012 11:34:05 -0500
-Subject: [PATCH] unionfs: use proper accessors for i_nlink
-
-commit: a78ef704a8dd430225955f0709b22d4a6ba21deb changed the semantics
-for accessing i_nlink.
-
- Author: Miklos Szeredi <mszeredi@suse.cz>
- Date: Fri Oct 28 14:13:30 2011 +0200
-
- vfs: protect i_nlink
-
- Prevent direct modification of i_nlink by making it const and adding a
- non-const __i_nlink alias.
-
- Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
- Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
- Signed-off-by: Christoph Hellwig <hch@lst.de>
-
-Updating unionfs to use the new accessor function.y
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- fs/unionfs/inode.c | 12 ++++++------
- fs/unionfs/rename.c | 4 ++--
- fs/unionfs/subr.c | 2 +-
- fs/unionfs/unlink.c | 2 +-
- 4 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
-index 83cb681..f016860 100644
---- a/fs/unionfs/inode.c
-+++ b/fs/unionfs/inode.c
-@@ -142,7 +142,7 @@ static int unionfs_create(struct inode *dir, struct dentry *dentry,
- fsstack_copy_inode_size(dir,
- lower_parent_dentry->d_inode);
- /* update no. of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
- }
-
-@@ -253,7 +253,7 @@ static int unionfs_link(struct dentry *old_dentry, struct inode *dir,
- lower_dir_dentry = dget_parent(lower_new_dentry);
- fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
- dput(lower_dir_dentry);
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- err = 0;
- }
- if (err)
-@@ -328,7 +328,7 @@ check_link:
- fsstack_copy_inode_size(dir, lower_new_dentry->d_parent->d_inode);
-
- /* propagate number of hard-links */
-- old_dentry->d_inode->i_nlink = unionfs_get_nlinks(old_dentry->d_inode);
-+ set_nlink(old_dentry->d_inode,unionfs_get_nlinks(old_dentry->d_inode));
- /* new dentry's ctime may have changed due to hard-link counts */
- unionfs_copy_attr_times(new_dentry->d_inode);
-
-@@ -402,7 +402,7 @@ static int unionfs_symlink(struct inode *dir, struct dentry *dentry,
- fsstack_copy_inode_size(dir,
- lower_parent_dentry->d_inode);
- /* update no. of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
- }
-
-@@ -514,7 +514,7 @@ static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
- lower_parent_dentry->d_inode);
-
- /* update number of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
-
- err = make_dir_opaque(dentry, dbstart(dentry));
-@@ -594,7 +594,7 @@ static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
- fsstack_copy_inode_size(dir,
- lower_parent_dentry->d_inode);
- /* update no. of links on parent directory */
-- dir->i_nlink = unionfs_get_nlinks(dir);
-+ set_nlink(dir,unionfs_get_nlinks(dir));
- }
- }
-
-diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c
-index c8ab910..ce85b84 100644
---- a/fs/unionfs/rename.c
-+++ b/fs/unionfs/rename.c
-@@ -212,8 +212,8 @@ static int do_unionfs_rename(struct inode *old_dir,
- fsstack_copy_attr_times(new_parent->d_inode,
- unlink_dir_dentry->d_inode);
- /* propagate number of hard-links */
-- new_parent->d_inode->i_nlink =
-- unionfs_get_nlinks(new_parent->d_inode);
-+ set_nlink(new_parent->d_inode,
-+ unionfs_get_nlinks(new_parent->d_inode));
-
- unlock_dir(unlink_dir_dentry);
- if (!err) {
-diff --git a/fs/unionfs/subr.c b/fs/unionfs/subr.c
-index bdca2f7..9dad537 100644
---- a/fs/unionfs/subr.c
-+++ b/fs/unionfs/subr.c
-@@ -91,5 +91,5 @@ void unionfs_copy_attr_all(struct inode *dest,
- * Update the nlinks AFTER updating the above fields, because the
- * get_links callback may depend on them.
- */
-- dest->i_nlink = unionfs_get_nlinks(dest);
-+ set_nlink(dest,unionfs_get_nlinks(dest));
- }
-diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
-index bf447bb..b607ba3 100644
---- a/fs/unionfs/unlink.c
-+++ b/fs/unionfs/unlink.c
-@@ -190,7 +190,7 @@ static int unionfs_rmdir_first(struct inode *dir, struct dentry *dentry,
-
- fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
- /* propagate number of hard-links */
-- dentry->d_inode->i_nlink = unionfs_get_nlinks(dentry->d_inode);
-+ set_nlink(dentry->d_inode,unionfs_get_nlinks(dentry->d_inode));
-
- out:
- if (lower_dir_dentry)
---
-1.7.4.1
-
diff --git a/features/unionfs/unionfs-v3.4-build-fixups.patch b/features/unionfs/unionfs-v3.4-build-fixups.patch
index f768d2a9..171493b7 100644
--- a/features/unionfs/unionfs-v3.4-build-fixups.patch
+++ b/features/unionfs/unionfs-v3.4-build-fixups.patch
@@ -1,12 +1,12 @@
-From d77100442e982e6418a115b6004b092014dad1f8 Mon Sep 17 00:00:00 2001
+From 18f0cb5ab10b6debd164b9b4c76f29a6c1bca87e Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Mon, 2 Apr 2012 11:36:07 -0400
-Subject: [PATCH] unionfs: v3.4 build fixups
+Subject: [PATCH 3/5] unionfs: v3.4 build fixups
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
fs/unionfs/union.h | 22 ++++++++++++++++++++--
- 1 files changed, 20 insertions(+), 2 deletions(-)
+ 1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 8e7fcfb..2d80523 100644
@@ -47,5 +47,5 @@ index 8e7fcfb..2d80523 100644
+
#endif /* not _UNION_H_ */
--
-1.7.5.4
+1.7.10.4
diff --git a/features/unionfs/unionfs.scc b/features/unionfs/unionfs.scc
index a5e27270..965ccb31 100644
--- a/features/unionfs/unionfs.scc
+++ b/features/unionfs/unionfs.scc
@@ -1,11 +1,7 @@
kconf non-hardware unionfs.cfg
-patch unionfs-introduce-unionfs-2.5.10-core-support.patch
-patch unionfs-use-proper-accessors-for-i_nlink.patch
+patch unionfs-introduce-unionfs-2.5.11-core-support.patch
patch unionfs-replace-d_alloc_root-with-d_make_root.patch
patch unionfs-v3.4-build-fixups.patch
-patch unionfs-change-end_writeback-to-clear_inode.patch
-patch Unionfs-update-show_options-prototype.patch
-patch Unionfs-use-mode_t.patch
patch unionfs-update-unionfs-fork-to-align-with-mainline.patch
patch unionfs-restore-FD_-utility-defines.patch