Bug#688834: linux: please update to 3.6-rc series
Ben Hutchings wrote:
> Jonathan Nieder wrote:
>> Small missing pieces (I can send a patch tomorrow):
>>
>> * update aufs
>>
>> * remove already applied patches:
>>
>> features/all/wacom/0029-wacom-do-not-request-tablet-data-on-MT-Tablet-PC-pen.patch
>> features/all/USB-add-USB_VENDOR_AND_INTERFACE_INFO-macro.patch
>>
>> * adjust "features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch"
>> to refer to CONFIG_MEMCG_DISABLED in code, not just kconfig files
Patches attached.
> I think it may be time to drop that patch, as memory cgroups have been
> better integrated now. But I'm not sure.
Not sure either, so I'm leaving that decision for another day.
Thanks,
Jonathan
Index: debian/patches/series
===================================================================
--- debian/patches/series (révision 19420)
+++ debian/patches/series (copie de travail)
@@ -8,14 +8,12 @@
# Patches and source files from aufs3 repository, imported with
# debian/patches/features/all/aufs3/gen-patch.
-#features/all/aufs3/aufs3-base.patch
-#features/all/aufs3/aufs3-standalone.patch
-#features/all/aufs3/aufs3-kbuild.patch
-#features/all/aufs3/aufs3-add.patch
+features/all/aufs3/aufs3-base.patch
+features/all/aufs3/aufs3-standalone.patch
+features/all/aufs3/aufs3-kbuild.patch
+features/all/aufs3/aufs3-add.patch
# mark as staging/crap
-#features/all/aufs3/mark-as-staging.patch
-# fix added exports from security/device_cgroup.c
-features/all/aufs3/aufs3-fix-export-__devcgroup_inode_permission.patch
+features/all/aufs3/mark-as-staging.patch
bugfix/ia64/hardcode-arch-script-output.patch
bugfix/mips/disable-advansys.patch
Index: debian/patches/features/all/aufs3/aufs3-standalone.patch
===================================================================
--- debian/patches/features/all/aufs3/aufs3-standalone.patch (révision 19420)
+++ debian/patches/features/all/aufs3/aufs3-standalone.patch (copie de travail)
@@ -1,10 +1,10 @@
-aufs3.5 standalone patch
+aufs3.x-rcN standalone patch
diff --git a/fs/file_table.c b/fs/file_table.c
-index a305d9e..6a768be 100644
+index 701985e..a9fe741 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
-@@ -35,6 +35,7 @@ struct files_stat_struct files_stat = {
+@@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
};
DEFINE_LGLOCK(files_lglock);
@@ -12,7 +12,7 @@
/* SLAB cache for file structures */
static struct kmem_cache *filp_cachep __read_mostly;
-@@ -441,6 +442,8 @@ void file_sb_list_del(struct file *file)
+@@ -509,6 +510,8 @@ void file_sb_list_del(struct file *file)
}
}
@@ -22,7 +22,7 @@
/*
diff --git a/fs/inode.c b/fs/inode.c
-index 7f772fd..e789d2f 100644
+index 7b2c8fa..0c4318d 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@@ -41,20 +41,8 @@
/**
* touch_atime - update the access time
-diff --git a/fs/namei.c b/fs/namei.c
-index 18c9782..f09edf3 100644
---- a/fs/namei.c
-+++ b/fs/namei.c
-@@ -1868,6 +1868,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
- {
- return __lookup_hash(&nd->last, nd->path.dentry, nd);
- }
-+EXPORT_SYMBOL_GPL(lookup_hash);
-
- /**
- * lookup_one_len - filesystem helper to lookup single pathname component
diff --git a/fs/namespace.c b/fs/namespace.c
-index 1e4a5fe..06aa768 100644
+index 4d31f73..fe1eca1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -50,6 +50,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
@@ -65,7 +53,7 @@
static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
{
-@@ -1341,6 +1342,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1401,6 +1402,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
@@ -135,7 +123,7 @@
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
-index 1540632..2463289 100644
+index e1f2cdb..2804cd6 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -147,10 +135,10 @@
static long do_sys_truncate(const char __user *pathname, loff_t length)
{
diff --git a/fs/splice.c b/fs/splice.c
-index e3c40b5..3afc547 100644
+index 663b402..51e1deb 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1114,6 +1114,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1117,6 +1117,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
@@ -158,7 +146,7 @@
/*
* Attempt to initiate a splice from a file to a pipe.
-@@ -1140,6 +1141,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1143,6 +1144,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
Index: debian/patches/features/all/aufs3/aufs3-add.patch
===================================================================
--- debian/patches/features/all/aufs3/aufs3-add.patch (révision 19420)
+++ debian/patches/features/all/aufs3/aufs3-add.patch (copie de travail)
@@ -1,5 +1,5 @@
--- a/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/Kconfig 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/Kconfig 2012-09-26 01:44:58.477910516 +0100
@@ -0,0 +1,203 @@
+config AUFS_FS
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
@@ -205,7 +205,7 @@
+ When aufs supports Magic SysRq, enabled automatically.
+endif
--- a/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/Makefile 2012-08-01 03:41:52.619414717 +0100
++++ b/fs/aufs/Makefile 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,42 @@
+
+include ${src}/magic.mk
@@ -250,7 +250,7 @@
+aufs-$(CONFIG_AUFS_DEBUG) += debug.o
+aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
--- a/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/aufs.h 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/aufs.h 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -313,7 +313,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_H__ */
--- a/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/branch.c 2012-07-22 01:31:00.134115312 +0100
++++ b/fs/aufs/branch.c 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,1169 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -1389,7 +1389,7 @@
+ spin_unlock(&hf->f_lock);
+ if (!file_check_writeable(hf)) {
+ file_release_write(hf);
-+ mnt_drop_write(hf->f_vfsmnt);
++ vfsub_mnt_drop_write(hf->f_vfsmnt);
+ }
+ }
+
@@ -1485,7 +1485,7 @@
+ return err;
+}
--- a/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/branch.h 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/branch.h 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -1718,7 +1718,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_BRANCH_H__ */
--- a/fs/aufs/conf.mk 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/conf.mk 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/conf.mk 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,38 @@
+
+AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
@@ -1759,8 +1759,8 @@
+
+-include ${srctree}/${src}/conf_priv.mk
--- a/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/cpup.c 2012-07-22 01:31:00.162115458 +0100
-@@ -0,0 +1,1084 @@
++++ b/fs/aufs/cpup.c 2012-09-26 01:44:58.481910453 +0100
+@@ -0,0 +1,1085 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -2249,7 +2249,8 @@
+ case S_IFREG:
+ /* try stopping to update while we are referencing */
+ IMustLock(h_inode);
-+ err = vfsub_create(h_dir, &h_path, mode | S_IWUSR);
++ err = vfsub_create(h_dir, &h_path, mode | S_IWUSR,
++ /*want_excl*/true);
+ if (!err)
+ err = au_do_cpup_regular
+ (dentry, bdst, bsrc, len,
@@ -2846,7 +2847,7 @@
+ return err;
+}
--- a/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/cpup.h 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/cpup.h 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -2930,7 +2931,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_CPUP_H__ */
--- a/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dbgaufs.c 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/dbgaufs.c 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,334 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -3267,7 +3268,7 @@
+ return err;
+}
--- a/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dbgaufs.h 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/dbgaufs.h 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -3319,7 +3320,7 @@
+#endif /* __KERNEL__ */
+#endif /* __DBGAUFS_H__ */
--- a/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dcsub.c 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/dcsub.c 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -3565,7 +3566,7 @@
+ return path_is_under(path + 0, path + 1);
+}
--- a/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dcsub.h 2012-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/dcsub.h 2012-09-26 01:44:58.481910453 +0100
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -3662,8 +3663,8 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DCSUB_H__ */
--- a/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/debug.c 2012-07-22 01:31:00.162115458 +0100
-@@ -0,0 +1,489 @@
++++ b/fs/aufs/debug.c 2012-09-26 01:44:58.485910356 +0100
+@@ -0,0 +1,490 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -3804,9 +3805,10 @@
+void au_dpri_dalias(struct inode *inode)
+{
+ struct dentry *d;
++ struct hlist_node *p;
+
+ spin_lock(&inode->i_lock);
-+ list_for_each_entry(d, &inode->i_dentry, d_alias)
++ hlist_for_each_entry(d, p, &inode->i_dentry, d_alias)
+ au_dpri_dentry(d);
+ spin_unlock(&inode->i_lock);
+}
@@ -4154,7 +4156,7 @@
+ return 0;
+}
--- a/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/debug.h 2012-07-22 01:31:00.162115458 +0100
++++ b/fs/aufs/debug.h 2012-09-26 01:44:58.485910356 +0100
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4399,8 +4401,8 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DEBUG_H__ */
--- a/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dentry.c 2012-07-22 01:31:00.162115458 +0100
-@@ -0,0 +1,1140 @@
++++ b/fs/aufs/dentry.c 2012-09-26 01:44:58.485910356 +0100
+@@ -0,0 +1,1063 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -4426,63 +4428,6 @@
+#include <linux/namei.h>
+#include "aufs.h"
+
-+static void au_h_nd(struct nameidata *h_nd, struct nameidata *nd)
-+{
-+ if (nd) {
-+ *h_nd = *nd;
-+
-+ /*
-+ * gave up supporting LOOKUP_CREATE/OPEN for lower fs,
-+ * due to whiteout and branch permission.
-+ */
-+ h_nd->flags &= ~(/*LOOKUP_PARENT |*/ LOOKUP_OPEN | LOOKUP_CREATE
-+ | LOOKUP_FOLLOW | LOOKUP_EXCL);
-+ /* unnecessary? */
-+ h_nd->intent.open.file = NULL;
-+ } else
-+ memset(h_nd, 0, sizeof(*h_nd));
-+}
-+
-+struct au_lkup_one_args {
-+ struct dentry **errp;
-+ struct qstr *name;
-+ struct dentry *h_parent;
-+ struct au_branch *br;
-+ struct nameidata *nd;
-+};
-+
-+struct dentry *au_lkup_one(struct qstr *name, struct dentry *h_parent,
-+ struct au_branch *br, struct nameidata *nd)
-+{
-+ struct dentry *h_dentry;
-+ int err;
-+ struct nameidata h_nd;
-+
-+ if (au_test_fs_null_nd(h_parent->d_sb))
-+ return vfsub_lookup_one_len(name->name, h_parent, name->len);
-+
-+ au_h_nd(&h_nd, nd);
-+ h_nd.path.dentry = h_parent;
-+ h_nd.path.mnt = br->br_mnt;
-+
-+ err = vfsub_name_hash(name->name, &h_nd.last, name->len);
-+ h_dentry = ERR_PTR(err);
-+ if (!err) {
-+ path_get(&h_nd.path);
-+ h_dentry = vfsub_lookup_hash(&h_nd);
-+ path_put(&h_nd.path);
-+ }
-+
-+ AuTraceErrPtr(h_dentry);
-+ return h_dentry;
-+}
-+
-+static void au_call_lkup_one(void *args)
-+{
-+ struct au_lkup_one_args *a = args;
-+ *a->errp = au_lkup_one(a->name, a->h_parent, a->br, a->nd);
-+}
-+
+#define AuLkup_ALLOW_NEG 1
+#define au_ftest_lkup(flags, name) ((flags) & AuLkup_##name)
+#define au_fset_lkup(flags, name) \
@@ -4493,7 +4438,7 @@
+struct au_do_lookup_args {
+ unsigned int flags;
+ mode_t type;
-+ struct nameidata *nd;
++ unsigned int nd_flags;
+};
+
+/*
@@ -4530,7 +4475,7 @@
+ return NULL; /* success */
+
+real_lookup:
-+ h_dentry = au_lkup_one(&dentry->d_name, h_parent, br, args->nd);
++ h_dentry = vfsub_lkup_one(&dentry->d_name, h_parent);
+ if (IS_ERR(h_dentry))
+ goto out;
+
@@ -4585,16 +4530,16 @@
+ * can be called at unlinking with @type is zero.
+ */
+int au_lkup_dentry(struct dentry *dentry, aufs_bindex_t bstart, mode_t type,
-+ struct nameidata *nd)
++ unsigned int flags)
+{
+ int npositive, err;
+ aufs_bindex_t bindex, btail, bdiropq;
+ unsigned char isdir;
+ struct qstr whname;
+ struct au_do_lookup_args args = {
-+ .flags = 0,
-+ .type = type,
-+ .nd = nd
++ .flags = 0,
++ .type = type,
++ .nd_flags = flags
+ };
+ const struct qstr *name = &dentry->d_name;
+ struct dentry *parent;
@@ -4690,17 +4635,15 @@
+ int wkq_err;
+
+ if (!au_test_h_perm_sio(parent->d_inode, MAY_EXEC))
-+ dentry = au_lkup_one(name, parent, br, /*nd*/NULL);
++ dentry = vfsub_lkup_one(name, parent);
+ else {
-+ struct au_lkup_one_args args = {
-+ .errp = &dentry,
-+ .name = name,
-+ .h_parent = parent,
-+ .br = br,
-+ .nd = NULL
++ struct vfsub_lkup_one_args args = {
++ .errp = &dentry,
++ .name = name,
++ .parent = parent
+ };
+
-+ wkq_err = au_wkq_wait(au_call_lkup_one, &args);
++ wkq_err = au_wkq_wait(vfsub_call_lkup_one, &args);
+ if (unlikely(wkq_err))
+ dentry = ERR_PTR(wkq_err);
+ }
@@ -4778,7 +4721,7 @@
+ return ia->i_ino != h_inode->i_ino
+ /* || ia->i_nlink != h_inode->i_nlink */
+ || !uid_eq(ia->i_uid, h_inode->i_uid)
-+ || !uid_eq(ia->i_gid, h_inode->i_gid)
++ || !gid_eq(ia->i_gid, h_inode->i_gid)
+ || ia->i_version != h_inode->i_version
+/*
+ || ia->i_size != h_inode->i_size
@@ -4808,7 +4751,7 @@
+ goto out;
+
+ /* main purpose is namei.c:cached_lookup() and d_revalidate */
-+ h_d = au_lkup_one(&h_dentry->d_name, h_parent, br, /*nd*/NULL);
++ h_d = vfsub_lkup_one(&h_dentry->d_name, h_parent);
+ err = PTR_ERR(h_d);
+ if (IS_ERR(h_d))
+ goto out;
@@ -5194,7 +5137,7 @@
+ * if current working dir is removed, it returns an error.
+ * but the dentry is legal.
+ */
-+ err = au_lkup_dentry(dentry, /*bstart*/0, /*type*/0, /*nd*/NULL);
++ err = au_lkup_dentry(dentry, /*bstart*/0, /*type*/0, /*flags*/0);
+ AuDbgDentry(dentry);
+ au_di_swap(tmp, dinfo);
+ if (err == -ENOENT)
@@ -5223,43 +5166,25 @@
+ return err;
+}
+
-+static noinline_for_stack
-+int au_do_h_d_reval(struct dentry *h_dentry, struct nameidata *nd,
-+ struct dentry *dentry, aufs_bindex_t bindex)
++static int au_do_h_d_reval(struct dentry *h_dentry, unsigned int flags,
++ struct dentry *dentry, aufs_bindex_t bindex)
+{
+ int err, valid;
-+ int (*reval)(struct dentry *, struct nameidata *);
+
+ err = 0;
+ if (!(h_dentry->d_flags & DCACHE_OP_REVALIDATE))
+ goto out;
-+ reval = h_dentry->d_op->d_revalidate;
+
+ AuDbg("b%d\n", bindex);
-+ if (au_test_fs_null_nd(h_dentry->d_sb))
-+ /* it may return tri-state */
-+ valid = reval(h_dentry, NULL);
-+ else {
-+ struct nameidata h_nd;
-+ int locked;
-+ struct dentry *parent;
++ /*
++ * gave up supporting LOOKUP_CREATE/OPEN for lower fs,
++ * due to whiteout and branch permission.
++ */
++ flags &= ~(/*LOOKUP_PARENT |*/ LOOKUP_OPEN | LOOKUP_CREATE
++ | LOOKUP_FOLLOW | LOOKUP_EXCL);
++ /* it may return tri-state */
++ valid = h_dentry->d_op->d_revalidate(h_dentry, flags);
+
-+ au_h_nd(&h_nd, nd);
-+ parent = nd->path.dentry;
-+ locked = (nd && nd->path.dentry != dentry);
-+ if (locked)
-+ di_read_lock_parent(parent, AuLock_IR);
-+ BUG_ON(bindex > au_dbend(parent));
-+ h_nd.path.dentry = au_h_dptr(parent, bindex);
-+ BUG_ON(!h_nd.path.dentry);
-+ h_nd.path.mnt = au_sbr(parent->d_sb, bindex)->br_mnt;
-+ path_get(&h_nd.path);
-+ valid = reval(h_dentry, &h_nd);
-+ path_put(&h_nd.path);
-+ if (locked)
-+ di_read_unlock(parent, AuLock_IR);
-+ }
-+
+ if (unlikely(valid < 0))
+ err = valid;
+ else if (!valid)
@@ -5272,7 +5197,7 @@
+
+/* todo: remove this */
+static int h_d_revalidate(struct dentry *dentry, struct inode *inode,
-+ struct nameidata *nd, int do_udba)
++ unsigned int flags, int do_udba)
+{
+ int err;
+ umode_t mode, h_mode;
@@ -5332,7 +5257,7 @@
+ }
+ spin_unlock(&h_dentry->d_lock);
+
-+ err = au_do_h_d_reval(h_dentry, nd, dentry, bindex);
++ err = au_do_h_d_reval(h_dentry, flags, dentry, bindex);
+ if (unlikely(err))
+ /* do not goto err, to keep the errno */
+ break;
@@ -5441,7 +5366,7 @@
+/*
+ * if valid returns 1, otherwise 0.
+ */
-+static int aufs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
++static int aufs_d_revalidate(struct dentry *dentry, unsigned int flags)
+{
+ int valid, err;
+ unsigned int sigen;
@@ -5450,7 +5375,7 @@
+ struct inode *inode;
+
+ /* todo: support rcu-walk? */
-+ if (nd && (nd->flags & LOOKUP_RCU))
++ if (flags & LOOKUP_RCU)
+ return -ECHILD;
+
+ valid = 0;
@@ -5507,7 +5432,7 @@
+ }
+ }
+
-+ err = h_d_revalidate(dentry, inode, nd, do_udba);
++ err = h_d_revalidate(dentry, inode, flags, do_udba);
+ if (unlikely(!err && do_udba && au_dbstart(dentry) < 0)) {
+ err = -EIO;
+ AuDbg("both of real entry and whiteout found, %.*s, err %d\n",
@@ -5542,8 +5467,8 @@
+ .d_release = aufs_d_release
+};
--- a/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dentry.h 2012-01-10 02:15:56.549455982 +0000
-@@ -0,0 +1,237 @@
++++ b/fs/aufs/dentry.h 2012-09-26 01:44:58.485910356 +0100
+@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -5592,15 +5517,13 @@
+/* dentry.c */
+extern const struct dentry_operations aufs_dop;
+struct au_branch;
-+struct dentry *au_lkup_one(struct qstr *name, struct dentry *h_parent,
-+ struct au_branch *br, struct nameidata *nd);
+struct dentry *au_sio_lkup_one(struct qstr *name, struct dentry *parent,
+ struct au_branch *br);
+int au_h_verify(struct dentry *h_dentry, unsigned int udba, struct inode *h_dir,
+ struct dentry *h_parent, struct au_branch *br);
+
+int au_lkup_dentry(struct dentry *dentry, aufs_bindex_t bstart, mode_t type,
-+ struct nameidata *nd);
++ unsigned int flags);
+int au_lkup_neg(struct dentry *dentry, aufs_bindex_t bindex);
+int au_refresh_dentry(struct dentry *dentry, struct dentry *parent);
+int au_reval_dpath(struct dentry *dentry, unsigned int sigen);
@@ -5782,7 +5705,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DENTRY_H__ */
--- a/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dinfo.c 2012-01-10 02:15:56.549455982 +0000
++++ b/fs/aufs/dinfo.c 2012-09-26 01:44:58.485910356 +0100
@@ -0,0 +1,543 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -6328,8 +6251,8 @@
+ return -1;
+}
--- a/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dir.c 2012-06-04 21:49:59.814840078 +0100
-@@ -0,0 +1,636 @@
++++ b/fs/aufs/dir.c 2012-09-26 01:44:58.485910356 +0100
+@@ -0,0 +1,633 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -6555,9 +6478,6 @@
+ finfo = au_fi(file);
+ fidir = finfo->fi_hdir;
+ if (fidir) {
-+ /* remove me from sb->s_files */
-+ file_sb_list_del(file);
-+
+ vdir_cache = fidir->fd_vdir_cache; /* lock-free */
+ if (vdir_cache)
+ au_vdir_free(vdir_cache);
@@ -6967,7 +6887,7 @@
+ .fsync = aufs_fsync_dir
+};
--- a/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dir.h 2012-01-10 02:15:56.549455982 +0000
++++ b/fs/aufs/dir.h 2012-09-26 01:44:58.485910356 +0100
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -7107,8 +7027,8 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DIR_H__ */
--- a/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dynop.c 2012-01-10 02:15:56.549455982 +0000
-@@ -0,0 +1,377 @@
++++ b/fs/aufs/dynop.c 2012-09-26 01:44:58.485910356 +0100
+@@ -0,0 +1,379 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
+ *
@@ -7305,6 +7225,8 @@
+ DySetAop(launder_page);
+ DySetAop(is_partially_uptodate);
+ DySetAop(error_remove_page);
++ DySetAop(swap_activate);
++ DySetAop(swap_deactivate);
+
+ DyDbgSize(cnt, *h_aop);
+ dyaop->da_get_xip_mem = h_aop->get_xip_mem;
@@ -7487,7 +7409,7 @@
+ WARN_ON(!list_empty(&dynop[i].head));
+}
--- a/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/dynop.h 2012-01-10 02:15:56.549455982 +0000
++++ b/fs/aufs/dynop.h 2012-09-26 01:44:58.485910356 +0100
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -7566,8 +7488,8 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DYNOP_H__ */
--- a/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/export.c 2012-07-22 01:31:00.162115458 +0100
-@@ -0,0 +1,810 @@
++++ b/fs/aufs/export.c 2012-09-26 01:44:58.489910277 +0100
+@@ -0,0 +1,811 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -7781,6 +7703,7 @@
+ struct dentry *dentry, *d;
+ struct inode *inode;
+ unsigned int sigen;
++ struct hlist_node *p;
+
+ dentry = NULL;
+ inode = ilookup(sb, ino);
@@ -7799,7 +7722,7 @@
+ dentry = d_find_alias(inode);
+ else {
+ spin_lock(&inode->i_lock);
-+ list_for_each_entry(d, &inode->i_dentry, d_alias) {
++ hlist_for_each_entry(d, p, &inode->i_dentry, d_alias) {
+ spin_lock(&d->d_lock);
+ if (!au_test_anon(d)
+ && d->d_parent->d_inode->i_ino == dir_ino) {
@@ -7953,7 +7876,7 @@
+ if (!arg.found)
+ goto out_name;
+
-+ /* do not call au_lkup_one() */
++ /* do not call vfsub_lkup_one() */
+ dir = parent->d_inode;
+ mutex_lock(&dir->i_mutex);
+ dentry = vfsub_lookup_one_len(arg.name, parent, arg.namelen);
@@ -8379,8 +8302,8 @@
+ atomic_set(&sbinfo->si_xigen_next, u);
+}
--- a/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/f_op.c 2012-08-01 03:41:52.619414717 +0100
-@@ -0,0 +1,727 @@
++++ b/fs/aufs/f_op.c 2012-09-26 01:44:58.489910277 +0100
+@@ -0,0 +1,724 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -8466,11 +8389,8 @@
+
+ finfo = au_fi(file);
+ bindex = finfo->fi_btop;
-+ if (bindex >= 0) {
-+ /* remove me from sb->s_files */
-+ file_sb_list_del(file);
++ if (bindex >= 0)
+ au_set_h_fptr(file, bindex, NULL);
-+ }
+
+ au_finfo_fin(file);
+ return 0;
@@ -9109,7 +9029,7 @@
+#endif
+};
--- a/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/f_op_sp.c 2012-07-22 01:31:00.162115458 +0100
++++ b/fs/aufs/f_op_sp.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,295 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -9407,8 +9327,8 @@
+ return ret;
+}
--- a/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/file.c 2012-06-04 21:49:59.854840268 +0100
-@@ -0,0 +1,676 @@
++++ b/fs/aufs/file.c 2012-09-26 01:44:58.489910277 +0100
+@@ -0,0 +1,683 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -10063,6 +9983,11 @@
+static int aufs_error_remove_page(struct address_space *mapping,
+ struct page *page)
+{ AuUnsupport(); return 0; }
++static int aufs_swap_activate(struct swap_info_struct *sis, struct file *file,
++ sector_t *span)
++{ AuUnsupport(); return 0; }
++static void aufs_swap_deactivate(struct file *file)
++{ AuUnsupport(); }
+#endif /* CONFIG_AUFS_DEBUG */
+
+const struct address_space_operations aufs_aop = {
@@ -10082,11 +10007,13 @@
+ .migratepage = aufs_migratepage,
+ .launder_page = aufs_launder_page,
+ .is_partially_uptodate = aufs_is_partially_uptodate,
-+ .error_remove_page = aufs_error_remove_page
++ .error_remove_page = aufs_error_remove_page,
++ .swap_activate = aufs_swap_activate,
++ .swap_deactivate = aufs_swap_deactivate
+#endif /* CONFIG_AUFS_DEBUG */
+};
--- a/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/file.h 2012-08-01 03:41:52.619414717 +0100
++++ b/fs/aufs/file.h 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,298 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -10387,7 +10314,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_FILE_H__ */
--- a/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/finfo.c 2012-01-10 02:15:56.549455982 +0000
++++ b/fs/aufs/finfo.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -10546,8 +10473,8 @@
+ return err;
+}
--- a/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/fstype.h 2012-01-10 02:15:56.553455997 +0000
-@@ -0,0 +1,496 @@
++++ b/fs/aufs/fstype.h 2012-09-26 01:44:58.489910277 +0100
+@@ -0,0 +1,481 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -10889,16 +10816,6 @@
+ || au_test_aufs(sb); /* will be supported in next version */
+}
+
-+/*
-+ * If the filesystem supports NFS-export, then it has to support NULL as
-+ * a nameidata parameter for ->create(), ->lookup() and ->d_revalidate().
-+ * We can apply this principle when we handle a lower filesystem.
-+ */
-+static inline int au_test_fs_null_nd(struct super_block *sb)
-+{
-+ return !!sb->s_export_op;
-+}
-+
+static inline int au_test_fs_remote(struct super_block *sb)
+{
+ return !au_test_tmpfs(sb)
@@ -11014,11 +10931,6 @@
+{
+ return au_test_fs_remote(sb)
+ || au_test_fs_bad_iattr_size(sb)
-+#ifdef CONFIG_AUFS_BR_RAMFS
-+ || !(au_test_ramfs(sb) || au_test_fs_null_nd(sb))
-+#else
-+ || !au_test_fs_null_nd(sb) /* to keep xino code simple */
-+#endif
+ /* don't want unnecessary work for xino */
+ || au_test_aufs(sb)
+ || au_test_ecryptfs(sb)
@@ -11045,7 +10957,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_FSTYPE_H__ */
--- a/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/hfsnotify.c 2012-07-22 01:31:00.162115458 +0100
++++ b/fs/aufs/hfsnotify.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -11305,7 +11217,7 @@
+ .init_br = au_hfsn_init_br
+};
--- a/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/hfsplus.c 2012-01-10 02:15:56.553455997 +0000
++++ b/fs/aufs/hfsplus.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -11365,8 +11277,8 @@
+ }
+}
--- a/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/hnotify.c 2012-07-22 01:31:00.162115458 +0100
-@@ -0,0 +1,712 @@
++++ b/fs/aufs/hnotify.c 2012-09-26 01:44:58.489910277 +0100
+@@ -0,0 +1,713 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -11569,6 +11481,7 @@
+ int err;
+ struct dentry *d;
+ struct qstr *dname;
++ struct hlist_node *p;
+
+ err = 1;
+ if (unlikely(inode->i_ino == AUFS_ROOT_INO)) {
@@ -11581,7 +11494,7 @@
+ AuDebugOn(!name);
+ au_iigen_dec(inode);
+ spin_lock(&inode->i_lock);
-+ list_for_each_entry(d, &inode->i_dentry, d_alias) {
++ hlist_for_each_entry(d, p, &inode->i_dentry, d_alias) {
+ spin_lock(&d->d_lock);
+ dname = &d->d_name;
+ if (dname->len != nlen
@@ -12080,7 +11993,7 @@
+ au_hn_destroy_cache();
+}
--- a/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op.c 2012-08-01 03:41:52.619414717 +0100
++++ b/fs/aufs/i_op.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,1009 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -12238,7 +12151,7 @@
+/* ---------------------------------------------------------------------- */
+
+static struct dentry *aufs_lookup(struct inode *dir, struct dentry *dentry,
-+ struct nameidata *nd)
++ unsigned int flags)
+{
+ struct dentry *ret, *parent;
+ struct inode *inode;
@@ -12270,7 +12183,7 @@
+ err = au_digen_test(parent, au_sigen(sb));
+ if (!err) {
+ npositive = au_lkup_dentry(dentry, au_dbstart(parent),
-+ /*type*/0, nd);
++ /*type*/0, flags);
+ err = npositive;
+ }
+ di_read_unlock(parent, AuLock_IR);
@@ -12442,7 +12355,7 @@
+void au_unpin(struct au_pin *p)
+{
+ if (p->h_mnt && au_ftest_pin(p->flags, MNT_WRITE))
-+ mnt_drop_write(p->h_mnt);
++ vfsub_mnt_drop_write(p->h_mnt);
+ if (!p->hdir)
+ return;
+
@@ -12470,7 +12383,7 @@
+ if (IS_ROOT(p->dentry)) {
+ if (au_ftest_pin(p->flags, MNT_WRITE)) {
+ p->h_mnt = br->br_mnt;
-+ err = mnt_want_write(p->h_mnt);
++ err = vfsub_mnt_want_write(p->h_mnt);
+ if (unlikely(err)) {
+ au_fclr_pin(p->flags, MNT_WRITE);
+ goto out_err;
@@ -12524,7 +12437,7 @@
+
+ if (au_ftest_pin(p->flags, MNT_WRITE)) {
+ p->h_mnt = br->br_mnt;
-+ err = mnt_want_write(p->h_mnt);
++ err = vfsub_mnt_want_write(p->h_mnt);
+ if (unlikely(err)) {
+ au_fclr_pin(p->flags, MNT_WRITE);
+ goto out_unpin;
@@ -13018,7 +12931,6 @@
+out_name:
+ __putname(buf.k);
+out:
-+ path_put(&nd->path);
+ AuTraceErr(err);
+ return ERR_PTR(err);
+}
@@ -13082,6 +12994,7 @@
+ .getattr = aufs_getattr,
+
+ .update_time = aufs_update_time
++ /* no support for atomic_open() */
+};
+
+struct inode_operations aufs_iop = {
@@ -13092,7 +13005,7 @@
+ .update_time = aufs_update_time
+};
--- a/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op_add.c 2012-06-04 21:49:59.854840268 +0100
++++ b/fs/aufs/i_op_add.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -13312,7 +13225,7 @@
+ union {
+ struct {
+ umode_t mode;
-+ struct nameidata *nd;
++ bool want_excl;
+ } c;
+ struct {
+ const char *symname;
@@ -13363,7 +13276,7 @@
+ h_dir = au_pinned_h_dir(&pin);
+ switch (arg->type) {
+ case Creat:
-+ err = vfsub_create(h_dir, &h_path, arg->u.c.mode);
++ err = vfsub_create(h_dir, &h_path, arg->u.c.mode, arg->u.c.want_excl);
+ break;
+ case Symlink:
+ err = vfsub_symlink(h_dir, &h_path, arg->u.s.symname);
@@ -13428,13 +13341,13 @@
+}
+
+int aufs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-+ struct nameidata *nd)
++ bool want_excl)
+{
+ struct simple_arg arg = {
+ .type = Creat,
+ .u.c = {
-+ .mode = mode,
-+ .nd = nd
++ .mode = mode,
++ .want_excl = want_excl
+ }
+ };
+ return add_simple(dir, dentry, &arg);
@@ -13807,7 +13720,7 @@
+ return err;
+}
--- a/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op_del.c 2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/i_op_del.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,478 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -13880,7 +13793,7 @@
+ au_di_swap(tmp, dinfo);
+ /* returns the number of positive dentries */
+ need_wh = au_lkup_dentry(dentry, bstart + 1, /*type*/0,
-+ /*nd*/NULL);
++ /*flags*/0);
+ au_di_swap(tmp, dinfo);
+ au_rw_write_unlock(&tmp->di_rwsem);
+ au_di_free(tmp);
@@ -14288,7 +14201,7 @@
+ return err;
+}
--- a/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/i_op_ren.c 2012-07-22 01:31:00.162115458 +0100
++++ b/fs/aufs/i_op_ren.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,1026 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -14411,11 +14324,11 @@
+{
+ int rerr;
+
-+ a->h_path.dentry = au_lkup_one(&a->src_dentry->d_name, a->src_h_parent,
-+ a->br, /*nd*/NULL);
++ a->h_path.dentry = vfsub_lkup_one(&a->src_dentry->d_name,
++ a->src_h_parent);
+ rerr = PTR_ERR(a->h_path.dentry);
+ if (IS_ERR(a->h_path.dentry)) {
-+ RevertFailure("au_lkup_one %.*s", AuDLNPair(a->src_dentry));
++ RevertFailure("lkup one %.*s", AuDLNPair(a->src_dentry));
+ return;
+ }
+
@@ -14445,11 +14358,11 @@
+{
+ int rerr;
+
-+ a->h_path.dentry = au_lkup_one(&a->dst_dentry->d_name, a->dst_h_parent,
-+ a->br, /*nd*/NULL);
++ a->h_path.dentry = vfsub_lkup_one(&a->dst_dentry->d_name,
++ a->dst_h_parent);
+ rerr = PTR_ERR(a->h_path.dentry);
+ if (IS_ERR(a->h_path.dentry)) {
-+ RevertFailure("lookup %.*s", AuDLNPair(a->dst_dentry));
++ RevertFailure("lkup one %.*s", AuDLNPair(a->dst_dentry));
+ return;
+ }
+ if (a->h_path.dentry->d_inode) {
@@ -14906,7 +14819,7 @@
+
+ sb = a->dst_dentry->d_sb;
+ if (au_ftest_ren(a->flags, MNT_WRITE))
-+ mnt_drop_write(a->br->br_mnt);
++ vfsub_mnt_drop_write(a->br->br_mnt);
+ vfsub_unlock_rename(a->src_h_parent, a->src_hdir,
+ a->dst_h_parent, a->dst_hdir);
+}
@@ -14936,7 +14849,7 @@
+ a->dst_h_parent->d_inode, a->dst_h_parent,
+ a->br);
+ if (!err) {
-+ err = mnt_want_write(a->br->br_mnt);
++ err = vfsub_mnt_want_write(a->br->br_mnt);
+ if (unlikely(err))
+ goto out_unlock;
+ au_fset_ren(a->flags, MNT_WRITE);
@@ -15317,7 +15230,7 @@
+ return err;
+}
--- a/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/iinfo.c 2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/iinfo.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -15584,7 +15497,7 @@
+ AuRwDestroy(&iinfo->ii_rwsem);
+}
--- a/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/inode.c 2012-08-01 04:08:08.827230713 +0100
++++ b/fs/aufs/inode.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,478 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -16051,7 +15964,7 @@
+
+int au_test_h_perm(struct inode *h_inode, int mask)
+{
-+ if (current_fsuid() == GLOBAL_ROOT_GID)
++ if (uid_eq(current_fsuid(), GLOBAL_ROOT_UID))
+ return 0;
+ return inode_permission(h_inode, mask);
+}
@@ -16065,7 +15978,7 @@
+ return au_test_h_perm(h_inode, mask);
+}
--- a/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/inode.h 2012-06-04 21:49:59.854840268 +0100
++++ b/fs/aufs/inode.h 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,560 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -16230,7 +16143,7 @@
+ dev_t dev);
+int aufs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
+int aufs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
-+ struct nameidata *nd);
++ bool want_excl);
+int aufs_link(struct dentry *src_dentry, struct inode *dir,
+ struct dentry *dentry);
+int aufs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
@@ -16628,7 +16541,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_INODE_H__ */
--- a/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/ioctl.c 2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/ioctl.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -16827,7 +16740,7 @@
+#endif
+#endif
--- a/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/loop.c 2012-07-22 01:31:00.162115458 +0100
++++ b/fs/aufs/loop.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -16963,7 +16876,7 @@
+ kfree(au_warn_loopback_array);
+}
--- a/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/loop.h 2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/loop.h 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -17016,7 +16929,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_LOOP_H__ */
--- a/fs/aufs/magic.mk 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/magic.mk 2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/magic.mk 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,54 @@
+
+# defined in ${srctree}/fs/fuse/inode.c
@@ -17073,7 +16986,7 @@
+ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b
+endif
--- a/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/module.c 2012-03-11 05:01:22.570973560 +0000
++++ b/fs/aufs/module.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -17272,7 +17185,7 @@
+module_init(aufs_init);
+module_exit(aufs_exit);
--- a/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/module.h 2012-03-11 05:01:22.570973560 +0000
++++ b/fs/aufs/module.h 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -17380,7 +17293,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_MODULE_H__ */
--- a/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/opts.c 2012-07-22 01:31:00.166115467 +0100
++++ b/fs/aufs/opts.c 2012-09-26 01:44:58.489910277 +0100
@@ -0,0 +1,1677 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19060,7 +18973,7 @@
+ return au_mntflags(sb) & AuOptMask_UDBA;
+}
--- a/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/opts.h 2012-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/opts.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19272,7 +19185,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_OPTS_H__ */
--- a/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/plink.c 2012-08-01 04:08:08.827230713 +0100
++++ b/fs/aufs/plink.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,511 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19485,7 +19398,7 @@
+
+ h_mtx = &h_parent->d_inode->i_mutex;
+ mutex_lock_nested(h_mtx, AuLsc_I_CHILD2);
-+ h_dentry = au_lkup_one(tgtname, h_parent, br, /*nd*/NULL);
++ h_dentry = vfsub_lkup_one(tgtname, h_parent);
+ mutex_unlock(h_mtx);
+ return h_dentry;
+}
@@ -19513,7 +19426,7 @@
+ h_dir = h_parent->d_inode;
+ tgtname.len = plink_name(a, sizeof(a), inode, bindex);
+
-+ if (current_fsuid() != GLOBAL_ROOT_GID) {
++ if (!uid_eq(current_fsuid(), GLOBAL_ROOT_UID)) {
+ struct au_do_plink_lkup_args args = {
+ .errp = &h_dentry,
+ .tgtname = &tgtname,
@@ -19543,7 +19456,7 @@
+ h_dir = h_parent->d_inode;
+ mutex_lock_nested(&h_dir->i_mutex, AuLsc_I_CHILD2);
+again:
-+ h_path.dentry = au_lkup_one(tgt, h_parent, br, /*nd*/NULL);
++ h_path.dentry = vfsub_lkup_one(tgt, h_parent);
+ err = PTR_ERR(h_path.dentry);
+ if (IS_ERR(h_path.dentry))
+ goto out;
@@ -19598,7 +19511,7 @@
+ tgtname.len = plink_name(a, sizeof(a), inode, bindex);
+
+ /* always superio. */
-+ if (current_fsuid() != GLOBAL_ROOT_GID) {
++ if (!uid_eq(current_fsuid(), GLOBAL_ROOT_UID)) {
+ struct do_whplink_args args = {
+ .errp = &err,
+ .tgt = &tgtname,
@@ -19786,7 +19699,7 @@
+ }
+}
--- a/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/poll.c 2012-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/poll.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19845,7 +19758,7 @@
+ return mask;
+}
--- a/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/procfs.c 2012-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/procfs.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -20018,7 +19931,7 @@
+ return err;
+}
--- a/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/rdu.c 2012-06-04 21:49:59.854840268 +0100
++++ b/fs/aufs/rdu.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,384 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -20405,7 +20318,7 @@
+}
+#endif
--- a/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/rwsem.h 2012-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/rwsem.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -20596,7 +20509,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_RWSEM_H__ */
--- a/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sbinfo.c 2012-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/sbinfo.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,343 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -20942,7 +20855,7 @@
+ spin_unlock(&sbinfo->au_si_pid.tree_lock);
+}
--- a/fs/aufs/spl.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/spl.h 2012-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/spl.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -21007,7 +20920,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_SPL_H__ */
--- a/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/super.c 2012-06-04 21:49:59.854840268 +0100
++++ b/fs/aufs/super.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,962 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -21060,7 +20973,7 @@
+{
+ struct inode *inode = container_of(head, struct inode, i_rcu);
+
-+ INIT_LIST_HEAD(&inode->i_dentry);
++ INIT_HLIST_HEAD(&inode->i_dentry);
+ au_cache_free_icntnr(container_of(inode, struct au_icntnr, vfs_inode));
+}
+
@@ -21972,7 +21885,7 @@
+ .owner = THIS_MODULE,
+};
--- a/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/super.h 2012-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/super.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,546 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22521,7 +22434,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_SUPER_H__ */
--- a/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysaufs.c 2012-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/sysaufs.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22629,7 +22542,7 @@
+ return err;
+}
--- a/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysaufs.h 2012-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/sysaufs.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22736,7 +22649,7 @@
+#endif /* __KERNEL__ */
+#endif /* __SYSAUFS_H__ */
--- a/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysfs.c 2012-07-22 01:31:00.166115467 +0100
++++ b/fs/aufs/sysfs.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22996,7 +22909,7 @@
+ }
+}
--- a/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysrq.c 2012-07-22 01:31:00.166115467 +0100
++++ b/fs/aufs/sysrq.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -23076,7 +22989,7 @@
+ spin_lock(&inode_sb_list_lock);
+ list_for_each_entry(i, &sb->s_inodes, i_sb_list) {
+ spin_lock(&i->i_lock);
-+ if (1 || list_empty(&i->i_dentry))
++ if (1 || hlist_empty(&i->i_dentry))
+ au_dpri_inode(i);
+ spin_unlock(&i->i_lock);
+ }
@@ -23147,7 +23060,7 @@
+ pr_err("err %d (ignored)\n", err);
+}
--- a/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vdir.c 2012-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/vdir.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,885 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -24035,8 +23948,8 @@
+ return 0;
+}
--- a/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vfsub.c 2012-06-04 21:49:59.854840268 +0100
-@@ -0,0 +1,832 @@
++++ b/fs/aufs/vfsub.c 2012-09-26 01:44:58.493910207 +0100
+@@ -0,0 +1,777 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -24091,9 +24004,7 @@
+{
+ struct file *file;
+
-+ path_get(path);
-+ file = dentry_open(path->dentry, path->mnt,
-+ flags /* | __FMODE_NONOTIFY */,
++ file = dentry_open(path, flags /* | __FMODE_NONOTIFY */,
+ current_cred());
+ if (!IS_ERR_OR_NULL(file)
+ && (file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ)
@@ -24150,50 +24061,12 @@
+ return path.dentry;
+}
+
-+struct dentry *vfsub_lookup_hash(struct nameidata *nd)
++void vfsub_call_lkup_one(void *args)
+{
-+ struct path path = {
-+ .mnt = nd->path.mnt
-+ };
-+
-+ IMustLock(nd->path.dentry->d_inode);
-+
-+ path.dentry = lookup_hash(nd);
-+ if (IS_ERR(path.dentry))
-+ goto out;
-+ if (path.dentry->d_inode)
-+ vfsub_update_h_iattr(&path, /*did*/NULL); /*ignore*/
-+
-+out:
-+ AuTraceErrPtr(path.dentry);
-+ return path.dentry;
++ struct vfsub_lkup_one_args *a = args;
++ *a->errp = vfsub_lkup_one(a->name, a->parent);
+}
+
-+/*
-+ * this is "VFS:__lookup_one_len()" which was removed and merged into
-+ * VFS:lookup_one_len() by the commit.
-+ * 6a96ba5 2011-03-14 kill __lookup_one_len()
-+ * this function should always be equivalent to the corresponding part in
-+ * VFS:lookup_one_len().
-+ */
-+int vfsub_name_hash(const char *name, struct qstr *this, int len)
-+{
-+ unsigned int c;
-+
-+ this->name = name;
-+ this->len = len;
-+ this->hash = full_name_hash(name, len);
-+ if (!len)
-+ return -EACCES;
-+
-+ while (len--) {
-+ c = *(const unsigned char *)name++;
-+ if (c == '/' || c == '\0')
-+ return -EACCES;
-+ }
-+ return 0;
-+}
-+
+/* ---------------------------------------------------------------------- */
+
+struct dentry *vfsub_lock_rename(struct dentry *d1, struct au_hinode *hdir1,
@@ -24224,7 +24097,7 @@
+
+/* ---------------------------------------------------------------------- */
+
-+int vfsub_create(struct inode *dir, struct path *path, int mode)
++int vfsub_create(struct inode *dir, struct path *path, int mode, bool want_excl)
+{
+ int err;
+ struct dentry *d;
@@ -24238,23 +24111,7 @@
+ if (unlikely(err))
+ goto out;
+
-+ if (au_test_fs_null_nd(dir->i_sb))
-+ err = vfs_create(dir, path->dentry, mode, NULL);
-+ else {
-+ struct nameidata h_nd;
-+
-+ memset(&h_nd, 0, sizeof(h_nd));
-+ h_nd.flags = LOOKUP_CREATE;
-+ h_nd.intent.open.flags = O_CREAT
-+ | vfsub_fmode_to_uint(FMODE_READ);
-+ h_nd.intent.open.create_mode = mode;
-+ h_nd.path.dentry = path->dentry->d_parent;
-+ h_nd.path.mnt = path->mnt;
-+ path_get(&h_nd.path);
-+ err = vfs_create(dir, path->dentry, mode, &h_nd);
-+ path_put(&h_nd.path);
-+ }
-+
++ err = vfs_create(dir, path->dentry, mode, want_excl);
+ if (!err) {
+ struct path tmp = *path;
+ int did;
@@ -24354,6 +24211,7 @@
+ if (unlikely(err))
+ return err;
+
++ /* we don't call may_linkat() */
+ d = path->dentry;
+ path->dentry = d->d_parent;
+ err = security_path_link(src_dentry, path, d);
@@ -24637,7 +24495,7 @@
+
+ h_inode = h_path->dentry->d_inode;
+ if (!h_file) {
-+ err = mnt_want_write(h_path->mnt);
++ err = vfsub_mnt_want_write(h_path->mnt);
+ if (err)
+ goto out;
+ err = inode_permission(h_inode, MAY_WRITE);
@@ -24665,7 +24523,7 @@
+ put_write_access(h_inode);
+out_mnt:
+ if (!h_file)
-+ mnt_drop_write(h_path->mnt);
++ vfsub_mnt_drop_write(h_path->mnt);
+out:
+ return err;
+}
@@ -24870,8 +24728,8 @@
+ return err;
+}
--- a/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vfsub.h 2012-07-22 01:31:00.166115467 +0100
-@@ -0,0 +1,252 @@
++++ b/fs/aufs/vfsub.h 2012-09-26 01:44:58.493910207 +0100
+@@ -0,0 +1,283 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -24901,12 +24759,12 @@
+
+#include <linux/fs.h>
+#include <linux/lglock.h>
++#include <linux/mount.h>
+#include "debug.h"
+
+/* copied from linux/fs/internal.h */
+/* todo: BAD approach!! */
+extern struct lglock vfsmount_lock;
-+extern void file_sb_list_del(struct file *f);
+extern spinlock_t inode_sb_list_lock;
+
+/* copied from linux/fs/file_table.c */
@@ -24993,20 +24851,51 @@
+struct file *vfsub_dentry_open(struct path *path, int flags);
+struct file *vfsub_filp_open(const char *path, int oflags, int mode);
+int vfsub_kern_path(const char *name, unsigned int flags, struct path *path);
++
+struct dentry *vfsub_lookup_one_len(const char *name, struct dentry *parent,
+ int len);
-+struct dentry *vfsub_lookup_hash(struct nameidata *nd);
-+int vfsub_name_hash(const char *name, struct qstr *this, int len);
+
++struct vfsub_lkup_one_args {
++ struct dentry **errp;
++ struct qstr *name;
++ struct dentry *parent;
++};
++
++static inline struct dentry *vfsub_lkup_one(struct qstr *name,
++ struct dentry *parent)
++{
++ return vfsub_lookup_one_len(name->name, parent, name->len);
++}
++
++void vfsub_call_lkup_one(void *args);
++
+/* ---------------------------------------------------------------------- */
+
++static inline int vfsub_mnt_want_write(struct vfsmount *mnt)
++{
++ int err;
++ lockdep_off();
++ err = mnt_want_write(mnt);
++ lockdep_on();
++ return err;
++}
++
++static inline void vfsub_mnt_drop_write(struct vfsmount *mnt)
++{
++ lockdep_off();
++ mnt_drop_write(mnt);
++ lockdep_on();
++}
++
++/* ---------------------------------------------------------------------- */
++
+struct au_hinode;
+struct dentry *vfsub_lock_rename(struct dentry *d1, struct au_hinode *hdir1,
+ struct dentry *d2, struct au_hinode *hdir2);
+void vfsub_unlock_rename(struct dentry *d1, struct au_hinode *hdir1,
+ struct dentry *d2, struct au_hinode *hdir2);
+
-+int vfsub_create(struct inode *dir, struct path *path, int mode);
++int vfsub_create(struct inode *dir, struct path *path, int mode, bool want_excl);
+int vfsub_symlink(struct inode *dir, struct path *path,
+ const char *symname);
+int vfsub_mknod(struct inode *dir, struct path *path, int mode, dev_t dev);
@@ -25125,7 +25014,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_VFSUB_H__ */
--- a/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/wbr_policy.c 2012-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/wbr_policy.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,700 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -25828,8 +25717,8 @@
+ }
+};
--- a/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/whout.c 2012-07-22 01:31:00.166115467 +0100
-@@ -0,0 +1,1041 @@
++++ b/fs/aufs/whout.c 2012-09-26 01:44:58.493910207 +0100
+@@ -0,0 +1,1042 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -25903,7 +25792,7 @@
+ struct dentry *wh_dentry;
+
+ if (!try_sio)
-+ wh_dentry = au_lkup_one(wh_name, h_parent, br, /*nd*/NULL);
++ wh_dentry = vfsub_lkup_one(wh_name, h_parent);
+ else
+ wh_dentry = au_sio_lkup_one(wh_name, h_parent, br);
+ err = PTR_ERR(wh_dentry);
@@ -26069,7 +25958,7 @@
+ };
+
+ err = 0;
-+ h_path.dentry = au_lkup_one(wh, h_parent, br, /*nd*/NULL);
++ h_path.dentry = vfsub_lkup_one(wh, h_parent);
+ if (IS_ERR(h_path.dentry))
+ err = PTR_ERR(h_path.dentry);
+ else {
@@ -26095,13 +25984,13 @@
+ if (!whpath->dentry->d_inode)
+ return;
+
-+ err = mnt_want_write(whpath->mnt);
++ err = vfsub_mnt_want_write(whpath->mnt);
+ if (!err) {
+ if (isdir)
+ err = vfsub_rmdir(h_dir, whpath);
+ else
+ err = vfsub_unlink(h_dir, whpath, /*force*/0);
-+ mnt_drop_write(whpath->mnt);
++ vfsub_mnt_drop_write(whpath->mnt);
+ }
+ if (unlikely(err))
+ pr_warn("failed removing %.*s (%d), ignored.\n",
@@ -26131,10 +26020,10 @@
+
+ if (au_test_nfs(path->dentry->d_sb))
+ mode |= S_IXUGO;
-+ err = mnt_want_write(path->mnt);
++ err = vfsub_mnt_want_write(path->mnt);
+ if (!err) {
+ err = vfsub_mkdir(h_dir, path, mode);
-+ mnt_drop_write(path->mnt);
++ vfsub_mnt_drop_write(path->mnt);
+ }
+ } else if (S_ISDIR(path->dentry->d_inode->i_mode))
+ err = 0;
@@ -26229,11 +26118,12 @@
+ err = -EEXIST;
+ h_dir = h_root->d_inode;
+ if (!base[AuBrWh_BASE].dentry->d_inode) {
-+ err = mnt_want_write(h_path->mnt);
++ err = vfsub_mnt_want_write(h_path->mnt);
+ if (!err) {
+ h_path->dentry = base[AuBrWh_BASE].dentry;
-+ err = vfsub_create(h_dir, h_path, WH_MASK);
-+ mnt_drop_write(h_path->mnt);
++ err = vfsub_create(h_dir, h_path, WH_MASK,
++ /*want_excl*/true);
++ vfsub_mnt_drop_write(h_path->mnt);
+ }
+ } else if (S_ISREG(base[AuBrWh_BASE].dentry->d_inode->i_mode))
+ err = 0;
@@ -26395,12 +26285,12 @@
+ err = au_h_verify(wbr->wbr_whbase, au_opt_udba(a->sb), hdir->hi_inode,
+ h_root, a->br);
+ if (!err) {
-+ err = mnt_want_write(a->br->br_mnt);
++ err = vfsub_mnt_want_write(a->br->br_mnt);
+ if (!err) {
+ h_path.dentry = wbr->wbr_whbase;
+ h_path.mnt = a->br->br_mnt;
+ err = vfsub_unlink(hdir->hi_inode, &h_path, /*force*/0);
-+ mnt_drop_write(a->br->br_mnt);
++ vfsub_mnt_drop_write(a->br->br_mnt);
+ }
+ } else {
+ pr_warn("%.*s is moved, ignored\n",
@@ -26494,7 +26384,7 @@
+ }
+
+ /* return this error in this context */
-+ err = vfsub_create(h_dir, &h_path, WH_MASK);
++ err = vfsub_create(h_dir, &h_path, WH_MASK, /*want_excl*/true);
+
+out:
+ wbr_wh_read_unlock(wbr);
@@ -26517,7 +26407,7 @@
+ sb = dentry->d_sb;
+ br = au_sbr(sb, bindex);
+ h_dentry = au_h_dptr(dentry, bindex);
-+ opq_dentry = au_lkup_one(&diropq_name, h_dentry, br, /*nd*/NULL);
++ opq_dentry = vfsub_lkup_one(&diropq_name, h_dentry);
+ if (IS_ERR(opq_dentry))
+ goto out;
+
@@ -26599,7 +26489,7 @@
+ err = au_wh_name_alloc(&wh_name, base_name);
+ wh_dentry = ERR_PTR(err);
+ if (!err) {
-+ wh_dentry = au_lkup_one(&wh_name, h_parent, br, /*nd*/NULL);
++ wh_dentry = vfsub_lkup_one(&wh_name, h_parent);
+ kfree(wh_name.name);
+ }
+ return wh_dentry;
@@ -26830,11 +26720,11 @@
+ err = au_h_verify(a->wh_dentry, au_opt_udba(sb), h_dir, h_parent,
+ a->br);
+ if (!err) {
-+ err = mnt_want_write(a->br->br_mnt);
++ err = vfsub_mnt_want_write(a->br->br_mnt);
+ if (!err) {
+ err = au_whtmp_rmdir(a->dir, bindex, a->wh_dentry,
+ &a->whlist);
-+ mnt_drop_write(a->br->br_mnt);
++ vfsub_mnt_drop_write(a->br->br_mnt);
+ }
+ }
+ au_hn_imtx_unlock(hdir);
@@ -26872,7 +26762,7 @@
+ }
+}
--- a/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/whout.h 2012-01-10 02:15:56.573456100 +0000
++++ b/fs/aufs/whout.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -26963,7 +26853,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_WHOUT_H__ */
--- a/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/wkq.c 2012-08-01 04:08:08.831230728 +0100
++++ b/fs/aufs/wkq.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,214 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -27013,7 +26903,7 @@
+{
+ struct au_wkinfo *wkinfo = container_of(wk, struct au_wkinfo, wk);
+
-+ AuDebugOn(current_fsuid() != GLOBAL_ROOT_GID);
++ AuDebugOn(!uid_eq(current_fsuid(), GLOBAL_ROOT_UID));
+ AuDebugOn(rlimit(RLIMIT_FSIZE) != RLIM_INFINITY);
+
+ wkinfo->func(wkinfo->args);
@@ -27180,7 +27070,7 @@
+ return err;
+}
--- a/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/wkq.h 2012-01-10 02:15:56.573456100 +0000
++++ b/fs/aufs/wkq.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -27275,7 +27165,7 @@
+#endif /* __KERNEL__ */
+#endif /* __AUFS_WKQ_H__ */
--- a/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/xino.c 2012-07-22 01:31:00.166115467 +0100
++++ b/fs/aufs/xino.c 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,1264 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -28542,7 +28432,7 @@
+ return err;
+}
--- a/include/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/aufs_type.h 2012-08-01 03:41:52.619414717 +0100
++++ b/include/linux/aufs_type.h 2012-09-26 01:44:58.493910207 +0100
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -28585,7 +28475,7 @@
+
+#include <linux/limits.h>
+
-+#define AUFS_VERSION "3.5-20120730"
++#define AUFS_VERSION "3.x-rcN-20120827"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
Index: debian/patches/features/all/aufs3/aufs3-base.patch
===================================================================
--- debian/patches/features/all/aufs3/aufs3-base.patch (révision 19420)
+++ debian/patches/features/all/aufs3/aufs3-base.patch (copie de travail)
@@ -1,7 +1,7 @@
-aufs3.5 base patch
+aufs3.x-rcN base patch
diff --git a/fs/inode.c b/fs/inode.c
-index c99163b..7f772fd 100644
+index ac8d904..7b2c8fa 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1491,7 +1491,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
@@ -13,24 +13,11 @@
{
if (inode->i_op->update_time)
return inode->i_op->update_time(inode, time, flags);
-diff --git a/fs/namei.c b/fs/namei.c
-index 7d69419..18c9782 100644
---- a/fs/namei.c
-+++ b/fs/namei.c
-@@ -1864,7 +1864,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
- * needs parent already locked. Doesn't follow mounts.
- * SMP-safe.
- */
--static struct dentry *lookup_hash(struct nameidata *nd)
-+struct dentry *lookup_hash(struct nameidata *nd)
- {
- return __lookup_hash(&nd->last, nd->path.dentry, nd);
- }
diff --git a/fs/splice.c b/fs/splice.c
-index 7bf08fa..e3c40b5 100644
+index 41514dd..663b402 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1090,8 +1090,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@@ -41,7 +28,7 @@
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -1118,9 +1118,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1121,9 +1121,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
@@ -55,10 +42,10 @@
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 17fd887..9c75a47 100644
+index aa11047..9116d2e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -2591,6 +2591,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
+@@ -2741,6 +2741,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
extern int inode_newsize_ok(const struct inode *, loff_t offset);
extern void setattr_copy(struct inode *inode, const struct iattr *attr);
@@ -66,18 +53,6 @@
extern int file_update_time(struct file *file);
extern int generic_show_options(struct seq_file *m, struct dentry *root);
-diff --git a/include/linux/namei.h b/include/linux/namei.h
-index ffc0213..ef35a31 100644
---- a/include/linux/namei.h
-+++ b/include/linux/namei.h
-@@ -85,6 +85,7 @@ 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 struct dentry *lookup_hash(struct nameidata *nd);
- extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
-
- extern int follow_down_one(struct path *);
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 09a545a..1ac5727 100644
--- a/include/linux/splice.h
Index: debian/patches/features/all/aufs3/aufs3-kbuild.patch
===================================================================
--- debian/patches/features/all/aufs3/aufs3-kbuild.patch (révision 19420)
+++ debian/patches/features/all/aufs3/aufs3-kbuild.patch (copie de travail)
@@ -1,4 +1,4 @@
-aufs3.5 kbuild patch
+aufs3.x-rcN kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index f95ae3a..6d8a9a5 100644
@@ -22,7 +22,7 @@
obj-$(CONFIG_PSTORE) += pstore/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
-index 8760be3..a1b8446 100644
+index fa21760..ee029e3 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -66,6 +66,7 @@ header-y += atmppp.h
Index: debian/changelog
===================================================================
--- debian/changelog (révision 19420)
+++ debian/changelog (copie de travail)
@@ -2,6 +2,9 @@
* New upstream release: http://kernelnewbies.org/Linux_3.6
+ [ Jonathan Nieder ]
+ * aufs: Update to aufs3.x-rcN-20120827
+
-- Bastian Blank <waldi@debian.org> Thu, 04 Oct 2012 17:50:39 +0200
linux (3.5.5-1~experimental.1) experimental; urgency=low
Index: debian/patches/series
===================================================================
--- debian/patches/series (révision 19420)
+++ debian/patches/series (copie de travail)
@@ -41,13 +41,11 @@
bugfix/arm/ixp4xx_iobe.patch
debian/x86-memtest-WARN-if-bad-RAM-found.patch
-features/all/wacom/0029-wacom-do-not-request-tablet-data-on-MT-Tablet-PC-pen.patch
bugfix/ia64/IA64-Export-asm-cmpxchg.h-to-userland.patch
features/all/cpu-devices/Partially-revert-cpufreq-Add-support-for-x86-cpuinfo.patch
debian/debugfs-set-default-mode-to-700.patch
bugfix/all/media-rc-ite-cir-Initialise-ite_dev-rdev-earlier.patch
-features/all/USB-add-USB_VENDOR_AND_INTERFACE_INFO-macro.patch
bugfix/alpha/alpha-use-large-data-model.diff
bugfix/all/speakup-lower-default-software-speech-rate.patch
Index: debian/patches/features/all/USB-add-USB_VENDOR_AND_INTERFACE_INFO-macro.patch
===================================================================
--- debian/patches/features/all/USB-add-USB_VENDOR_AND_INTERFACE_INFO-macro.patch (révision 19420)
+++ debian/patches/features/all/USB-add-USB_VENDOR_AND_INTERFACE_INFO-macro.patch (copie de travail)
@@ -1,56 +0,0 @@
-From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-Date: Tue, 10 Jul 2012 19:10:06 -0300
-Subject: USB: add USB_VENDOR_AND_INTERFACE_INFO() macro
-
-commit d81a5d1956731c453b85c141458d4ff5d6cc5366 upstream.
-
-A lot of Broadcom Bluetooth devices provides vendor specific interface
-class and we are getting flooded by patches adding new device support.
-This change will help us enable support for any other Broadcom with vendor
-specific device that arrives in the future.
-
-Only the product id changes for those devices, so this macro would be
-perfect for us:
-
-{ USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) }
-
-Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-Acked-by: Henrik Rydberg <rydberg@bitmath.se>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/linux/usb.h | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/include/linux/usb.h b/include/linux/usb.h
-index 873956b..30d1ae3 100644
---- a/include/linux/usb.h
-+++ b/include/linux/usb.h
-@@ -861,6 +861,27 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size)
- .bInterfaceSubClass = (sc), \
- .bInterfaceProtocol = (pr)
-
-+/**
-+ * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces
-+ * @vend: the 16 bit USB Vendor ID
-+ * @cl: bInterfaceClass value
-+ * @sc: bInterfaceSubClass value
-+ * @pr: bInterfaceProtocol value
-+ *
-+ * This macro is used to create a struct usb_device_id that matches a
-+ * specific vendor with a specific class of interfaces.
-+ *
-+ * This is especially useful when explicitly matching devices that have
-+ * vendor specific bDeviceClass values, but standards-compliant interfaces.
-+ */
-+#define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \
-+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
-+ | USB_DEVICE_ID_MATCH_VENDOR, \
-+ .idVendor = (vend), \
-+ .bInterfaceClass = (cl), \
-+ .bInterfaceSubClass = (sc), \
-+ .bInterfaceProtocol = (pr)
-+
- /* ----------------------------------------------------------------------- */
-
- /* Stuff for dynamic usb ids */
Index: debian/patches/features/all/wacom/0029-wacom-do-not-request-tablet-data-on-MT-Tablet-PC-pen.patch
===================================================================
--- debian/patches/features/all/wacom/0029-wacom-do-not-request-tablet-data-on-MT-Tablet-PC-pen.patch (révision 19420)
+++ debian/patches/features/all/wacom/0029-wacom-do-not-request-tablet-data-on-MT-Tablet-PC-pen.patch (copie de travail)
@@ -1,37 +0,0 @@
-From: Ping Cheng <pinglinux@gmail.com>
-Date: Sun, 24 Jun 2012 23:29:29 -0500
-Subject: wacom: do not request tablet data on MT Tablet PC pen interface
-Bug-Debian: http://bugs.debian.org/677164
-
-When in commit 1963518b9b1b (Input: wacom - add 0xE5 (MT device)
-support, 2012-04-29) the driver stopped asking for multitouch tablet
-data on the pen interface of a tablet PC, as a side effect we started
-executing the "else" to that if statement. Oops.
-
-This is needed for the 0xE6 tablet in the Thinkpad x220t to be usable
-again. Meanwhile the 0xE3 works fine without this. Not sure why. -jn
-
-[jn: extracted from a larger commit in the input-wacom repository,
- with new description]
-
-Signed-off-by: Ping Cheng <pingc@wacom.com>
-Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
----
- drivers/input/tablet/wacom_sys.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
-index 8b31473a81fe..19e4725858dd 100644
---- a/drivers/input/tablet/wacom_sys.c
-+++ b/drivers/input/tablet/wacom_sys.c
-@@ -467,6 +467,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
- }
- } else if (features->type <= BAMBOO_PT &&
- features->type != WIRELESS &&
-+ features->type != TABLETPC2FG &&
- features->device_type == BTN_TOOL_PEN) {
- do {
- rep_data[0] = 2;
---
-1.7.11.rc3
-
Index: debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch
===================================================================
--- debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch (révision 19420)
+++ debian/patches/features/all/cgroups-Allow-memory-cgroup-support-to-be-included-b.patch (copie de travail)
@@ -96,7 +96,7 @@
struct cgroup_subsys mem_cgroup_subsys = {
.name = "memory",
-+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_DISABLED
++#ifdef CONFIG_MEMCG_DISABLED
+ .disabled = 1,
+#endif
.subsys_id = mem_cgroup_subsys_id,
Reply to: