[kernel] r19271 - in dists/trunk/linux/debian: . patches patches/features/all/aufs3

Ben Hutchings benh at alioth.debian.org
Sun Jul 22 00:33:38 UTC 2012


Author: benh
Date: Sun Jul 22 00:33:36 2012
New Revision: 19271

Log:
aufs: Update to 3.x-rcN 20120618

Modified:
   dists/trunk/linux/debian/changelog
   dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-add.patch
   dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-base.patch
   dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch
   dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch
   dists/trunk/linux/debian/patches/series

Modified: dists/trunk/linux/debian/changelog
==============================================================================
--- dists/trunk/linux/debian/changelog	Sat Jul 21 23:32:14 2012	(r19270)
+++ dists/trunk/linux/debian/changelog	Sun Jul 22 00:33:36 2012	(r19271)
@@ -4,7 +4,7 @@
 
   [ Ben Hutchings ]
   * net: Enable OPENVSWITCH as module (Closes: #675010)
-  * aufs: Disable until it is updated for Linux 3.5
+  * aufs: Update to 3.x-rcN 20120618
   * rt: Disable until it is updated for Linux 3.5 or later
 
  -- Ben Hutchings <ben at decadent.org.uk>  Mon, 02 Jul 2012 15:09:43 +0100

Modified: dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-add.patch
==============================================================================
--- dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-add.patch	Sat Jul 21 23:32:14 2012	(r19270)
+++ dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-add.patch	Sun Jul 22 00:33:36 2012	(r19271)
@@ -205,8 +205,8 @@
 +	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-01-10 02:15:56.545455955 +0000
-@@ -0,0 +1,42 @@
++++ b/fs/aufs/Makefile	2012-07-22 01:31:00.130115298 +0100
+@@ -0,0 +1,45 @@
 +
 +include ${src}/magic.mk
 +ifeq (${CONFIG_AUFS_FS},m)
@@ -246,6 +246,9 @@
 +aufs-$(CONFIG_AUFS_POLL) += poll.o
 +aufs-$(CONFIG_AUFS_RDU) += rdu.o
 +aufs-$(CONFIG_AUFS_SP_IATTR) += f_op_sp.o
++ifdef CONFIG_MMU
++aufs-$(CONFIG_SECURITY) += security.o
++endif
 +aufs-$(CONFIG_AUFS_BR_HFSPLUS) += hfsplus.o
 +aufs-$(CONFIG_AUFS_DEBUG) += debug.o
 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
@@ -313,7 +316,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-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/branch.c	2012-07-22 01:31:00.134115312 +0100
 @@ -0,0 +1,1169 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -568,14 +571,14 @@
 +	if (au_opt_test(au_mntflags(sb), WARN_PERM)) {
 +		h_inode = au_h_dptr(root, 0)->d_inode;
 +		if ((h_inode->i_mode & S_IALLUGO) != (inode->i_mode & S_IALLUGO)
-+		    || h_inode->i_uid != inode->i_uid
-+		    || h_inode->i_gid != inode->i_gid)
-+			pr_warning("uid/gid/perm %s %u/%u/0%o, %u/%u/0%o\n",
-+				   add->pathname,
-+				   inode->i_uid, inode->i_gid,
-+				   (inode->i_mode & S_IALLUGO),
-+				   h_inode->i_uid, h_inode->i_gid,
-+				   (h_inode->i_mode & S_IALLUGO));
++		    || !uid_eq(h_inode->i_uid, inode->i_uid)
++		    || !gid_eq(h_inode->i_gid, inode->i_gid))
++			pr_warn("uid/gid/perm %s %u/%u/0%o, %u/%u/0%o\n",
++				add->pathname,
++				i_uid_read(inode), i_gid_read(inode),
++				(inode->i_mode & S_IALLUGO),
++				i_uid_read(h_inode), i_gid_read(h_inode),
++				(h_inode->i_mode & S_IALLUGO));
 +	}
 +
 +out:
@@ -1170,8 +1173,8 @@
 +	/* revert */
 +	rerr = au_br_init_wh(sb, br, br->br_perm, del->h_path.dentry);
 +	if (rerr)
-+		pr_warning("failed re-creating base whiteout, %s. (%d)\n",
-+			   del->pathname, rerr);
++		pr_warn("failed re-creating base whiteout, %s. (%d)\n",
++			del->pathname, rerr);
 +out:
 +	return err;
 +}
@@ -1282,7 +1285,7 @@
 +
 +	n = 0;
 +	p = a;
-+	lg_global_lock(files_lglock);
++	lg_global_lock(&files_lglock);
 +	do_file_list_for_each_entry(sb, f) {
 +		if (au_fi(f)
 +		    && file_count(f)
@@ -1293,7 +1296,7 @@
 +			AuDebugOn(n > max);
 +		}
 +	} while_file_list_for_each_entry;
-+	lg_global_unlock(files_lglock);
++	lg_global_unlock(&files_lglock);
 +
 +	return n;
 +}
@@ -1759,7 +1762,7 @@
 +
 +-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-06-04 21:49:59.814840078 +0100
++++ b/fs/aufs/cpup.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,1084 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -1907,7 +1910,7 @@
 +
 +	err = vfsub_notify_change(&dt->dt_h_path, &attr);
 +	if (unlikely(err))
-+		pr_warning("restoring timestamps failed(%d). ignored\n", err);
++		pr_warn("restoring timestamps failed(%d). ignored\n", err);
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -3662,7 +3665,7 @@
 +#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-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/debug.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,489 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4144,7 +4147,7 @@
 +	AuDebugOn(destr.len < NAME_MAX);
 +
 +#ifdef CONFIG_4KSTACKS
-+	pr_warning("CONFIG_4KSTACKS is defined.\n");
++	pr_warn("CONFIG_4KSTACKS is defined.\n");
 +#endif
 +
 +#ifdef AuForceNoBrs
@@ -4154,7 +4157,7 @@
 +	return 0;
 +}
 --- a/fs/aufs/debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/debug.h	2012-06-04 21:49:59.814840078 +0100
++++ b/fs/aufs/debug.h	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,242 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4221,7 +4224,7 @@
 +#define AuWarn1(fmt, ...) do { \
 +	static unsigned char _c; \
 +	if (!_c++) \
-+		pr_warning(fmt, ##__VA_ARGS__); \
++		pr_warn(fmt, ##__VA_ARGS__); \
 +} while (0)
 +
 +#define AuErr1(fmt, ...) do { \
@@ -4399,7 +4402,7 @@
 +#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-01-10 02:15:56.545455955 +0000
++++ b/fs/aufs/dentry.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,1140 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4749,8 +4752,8 @@
 +struct au_iattr {
 +	unsigned long		i_ino;
 +	/* unsigned int		i_nlink; */
-+	uid_t			i_uid;
-+	gid_t			i_gid;
++	kuid_t			i_uid;
++	kgid_t			i_gid;
 +	u64			i_version;
 +/*
 +	loff_t			i_size;
@@ -4777,8 +4780,8 @@
 +{
 +	return ia->i_ino != h_inode->i_ino
 +		/* || ia->i_nlink != h_inode->i_nlink */
-+		|| ia->i_uid != h_inode->i_uid
-+		|| ia->i_gid != h_inode->i_gid
++		|| !uid_eq(ia->i_uid, h_inode->i_uid)
++		|| !uid_eq(ia->i_gid, h_inode->i_gid)
 +		|| ia->i_version != h_inode->i_version
 +/*
 +		|| ia->i_size != h_inode->i_size
@@ -7566,8 +7569,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-06-04 21:49:59.850840259 +0100
-@@ -0,0 +1,803 @@
++++ b/fs/aufs/export.c	2012-07-22 01:31:00.162115458 +0100
+@@ -0,0 +1,810 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -7856,9 +7859,9 @@
 +	};
 +
 +	get_fs_root(current->fs, &root);
-+	br_read_lock(vfsmount_lock);
++	br_read_lock(&vfsmount_lock);
 +	err = iterate_mounts(au_compare_mnt, &args, root.mnt);
-+	br_read_unlock(vfsmount_lock);
++	br_read_unlock(&vfsmount_lock);
 +	path_put(&root);
 +	AuDebugOn(!err);
 +	AuDebugOn(!args.mnt);
@@ -8226,19 +8229,16 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static int aufs_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len,
-+			  int connectable)
++static int aufs_encode_fh(struct inode *inode, __u32 *fh, int *max_len,
++			  struct inode *dir)
 +{
 +	int err;
-+	aufs_bindex_t bindex, bend;
++	aufs_bindex_t bindex;
 +	struct super_block *sb, *h_sb;
-+	struct inode *inode;
-+	struct dentry *parent, *h_parent;
++	struct dentry *dentry, *parent, *h_parent;
++	struct inode *h_dir;
 +	struct au_branch *br;
 +
-+	AuDebugOn(au_test_anon(dentry));
-+
-+	parent = NULL;
 +	err = -ENOSPC;
 +	if (unlikely(*max_len <= Fh_tail)) {
 +		AuWarn1("NFSv2 client (max_len %d)?\n", *max_len);
@@ -8246,49 +8246,58 @@
 +	}
 +
 +	err = FILEID_ROOT;
-+	if (IS_ROOT(dentry)) {
-+		AuDebugOn(dentry->d_inode->i_ino != AUFS_ROOT_INO);
++	if (inode->i_ino == AUFS_ROOT_INO) {
++		AuDebugOn(inode->i_ino != AUFS_ROOT_INO);
 +		goto out;
 +	}
 +
 +	h_parent = NULL;
-+	err = aufs_read_lock(dentry, AuLock_FLUSH | AuLock_IR | AuLock_GEN);
++	sb = inode->i_sb;
++	err = si_read_lock(sb, AuLock_FLUSH);
 +	if (unlikely(err))
 +		goto out;
 +
-+	inode = dentry->d_inode;
-+	AuDebugOn(!inode);
-+	sb = dentry->d_sb;
 +#ifdef CONFIG_AUFS_DEBUG
 +	if (unlikely(!au_opt_test(au_mntflags(sb), XINO)))
 +		AuWarn1("NFS-exporting requires xino\n");
 +#endif
 +	err = -EIO;
-+	parent = dget_parent(dentry);
-+	di_read_lock_parent(parent, !AuLock_IR);
-+	bend = au_dbtaildir(parent);
-+	for (bindex = au_dbstart(parent); bindex <= bend; bindex++) {
-+		h_parent = au_h_dptr(parent, bindex);
-+		if (h_parent) {
-+			dget(h_parent);
-+			break;
-+		}
++	parent = NULL;
++	ii_read_lock_child(inode);
++	bindex = au_ibstart(inode);
++	if (!dir) {
++		dentry = d_find_alias(inode);
++		if (unlikely(!dentry))
++			goto out_unlock;
++		AuDebugOn(au_test_anon(dentry));
++		parent = dget_parent(dentry);
++		dput(dentry);
++		if (unlikely(!parent))
++			goto out_unlock;
++		dir = parent->d_inode;
 +	}
++
++	ii_read_lock_parent(dir);
++	h_dir = au_h_iptr(dir, bindex);
++	ii_read_unlock(dir);
++	if (unlikely(!h_dir))
++		goto out_parent;
++	h_parent = d_find_alias(h_dir);
 +	if (unlikely(!h_parent))
-+		goto out_unlock;
++		goto out_hparent;
 +
 +	err = -EPERM;
 +	br = au_sbr(sb, bindex);
 +	h_sb = br->br_mnt->mnt_sb;
 +	if (unlikely(!h_sb->s_export_op)) {
 +		AuErr1("%s branch is not exportable\n", au_sbtype(h_sb));
-+		goto out_dput;
++		goto out_hparent;
 +	}
 +
 +	fh[Fh_br_id] = br->br_id;
 +	fh[Fh_sigen] = au_sigen(sb);
 +	encode_ino(fh + Fh_ino, inode->i_ino);
-+	encode_ino(fh + Fh_dir_ino, parent->d_inode->i_ino);
++	encode_ino(fh + Fh_dir_ino, dir->i_ino);
 +	fh[Fh_igen] = inode->i_generation;
 +
 +	*max_len -= Fh_tail;
@@ -8303,12 +8312,13 @@
 +	else
 +		AuWarn1("%s encode_fh failed\n", au_sbtype(h_sb));
 +
-+out_dput:
++out_hparent:
 +	dput(h_parent);
-+out_unlock:
-+	di_read_unlock(parent, !AuLock_IR);
++out_parent:
 +	dput(parent);
-+	aufs_read_unlock(dentry, AuLock_IR);
++out_unlock:
++	ii_read_unlock(inode);
++	si_read_unlock(sb);
 +out:
 +	if (unlikely(err < 0))
 +		err = 255;
@@ -8372,8 +8382,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-01-10 02:15:56.549455982 +0000
-@@ -0,0 +1,729 @@
++++ b/fs/aufs/f_op.c	2012-07-22 01:31:00.162115458 +0100
+@@ -0,0 +1,692 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -8821,45 +8831,9 @@
 + * The similar scenario is applied to aufs_readlink() too.
 + */
 +
-+/* cf. linux/include/linux/mman.h: calc_vm_prot_bits() */
-+#define AuConv_VM_PROT(f, b)	_calc_vm_trans(f, VM_##b, PROT_##b)
-+
-+static unsigned long au_arch_prot_conv(unsigned long flags)
-+{
-+	/* currently ppc64 only */
-+#ifdef CONFIG_PPC64
-+	/* cf. linux/arch/powerpc/include/asm/mman.h */
-+	AuDebugOn(arch_calc_vm_prot_bits(-1) != VM_SAO);
-+	return AuConv_VM_PROT(flags, SAO);
-+#else
-+	AuDebugOn(arch_calc_vm_prot_bits(-1));
-+	return 0;
-+#endif
-+}
-+
-+static unsigned long au_prot_conv(unsigned long flags)
-+{
-+	return AuConv_VM_PROT(flags, READ)
-+		| AuConv_VM_PROT(flags, WRITE)
-+		| AuConv_VM_PROT(flags, EXEC)
-+		| au_arch_prot_conv(flags);
-+}
-+
-+/* cf. linux/include/linux/mman.h: calc_vm_flag_bits() */
-+#define AuConv_VM_MAP(f, b)	_calc_vm_trans(f, VM_##b, MAP_##b)
-+
-+static unsigned long au_flag_conv(unsigned long flags)
-+{
-+	return AuConv_VM_MAP(flags, GROWSDOWN)
-+		| AuConv_VM_MAP(flags, DENYWRITE)
-+		| AuConv_VM_MAP(flags, EXECUTABLE)
-+		| AuConv_VM_MAP(flags, LOCKED);
-+}
-+
 +static int aufs_mmap(struct file *file, struct vm_area_struct *vma)
 +{
 +	int err;
-+	unsigned long prot;
 +	aufs_bindex_t bstart;
 +	const unsigned char wlock
 +		= (file->f_mode & FMODE_WRITE) && (vma->vm_flags & VM_SHARED);
@@ -8899,9 +8873,8 @@
 +	lockdep_on();
 +
 +	au_vm_file_reset(vma, h_file);
-+	prot = au_prot_conv(vma->vm_flags);
-+	err = security_file_mmap(h_file, /*reqprot*/prot, prot,
-+				 au_flag_conv(vma->vm_flags), vma->vm_start, 0);
++	/* todo: bad approach, I am not sure this is really necessary */
++	err = au_security_mmap_file(h_file, vma);
 +	if (!err)
 +		err = h_file->f_op->mmap(h_file, vma);
 +	if (unlikely(err))
@@ -9104,8 +9077,8 @@
 +#endif
 +};
 --- a/fs/aufs/f_op_sp.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/f_op_sp.c	2012-01-10 02:15:56.549455982 +0000
-@@ -0,0 +1,298 @@
++++ b/fs/aufs/f_op_sp.c	2012-07-22 01:31:00.162115458 +0100
+@@ -0,0 +1,295 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -9182,9 +9155,6 @@
 +	/* do not change the file in kio */
 +	AuDebugOn(!h_file->f_op || !h_file->f_op->aio_write);
 +	err = h_file->f_op->aio_write(kio, iov, nv, pos);
-+	if (err > 0 && wbr)
-+		file_update_time(h_file);
-+
 +	return err;
 +}
 +
@@ -10084,8 +10054,8 @@
 +#endif /* CONFIG_AUFS_DEBUG */
 +};
 --- a/fs/aufs/file.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/file.h	2012-01-10 02:15:56.549455982 +0000
-@@ -0,0 +1,298 @@
++++ b/fs/aufs/file.h	2012-07-22 01:31:00.162115458 +0100
+@@ -0,0 +1,306 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -10169,6 +10139,14 @@
 +int au_do_flush(struct file *file, fl_owner_t id,
 +		int (*flush)(struct file *file, fl_owner_t id));
 +
++#if defined(CONFIG_SECURITY) && defined(CONFIG_MMU)
++/* security.c */
++int au_security_mmap_file(struct file *h_file, struct vm_area_struct *vma);
++#else
++AuStubInt0(au_security_mmap_file, struct file *h_file,
++	   struct vm_area_struct *vma);
++#endif
++
 +/* poll.c */
 +#ifdef CONFIG_AUFS_POLL
 +unsigned int aufs_poll(struct file *file, poll_table *wait);
@@ -10315,7 +10293,7 @@
 +{
 +	if (atomic_inc_return(&au_fi(f)->fi_mmapped))
 +		return;
-+	pr_warning("fi_mmapped wrapped around\n");
++	pr_warn("fi_mmapped wrapped around\n");
 +	while (!atomic_inc_return(&au_fi(f)->fi_mmapped))
 +		;
 +}
@@ -11043,8 +11021,8 @@
 +#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-03-11 05:01:22.570973560 +0000
-@@ -0,0 +1,260 @@
++++ b/fs/aufs/hfsnotify.c	2012-07-22 01:31:00.162115458 +0100
+@@ -0,0 +1,257 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -11190,10 +11168,7 @@
 +	struct au_hnotify *hnotify;
 +	struct inode *h_dir, *h_inode;
 +	__u32 mask;
-+	struct qstr h_child_qstr = {
-+		.name	= event->file_name,
-+		.len	= event->name_len
-+	};
++	struct qstr h_child_qstr = QSTR_INIT(event->file_name, event->name_len);
 +
 +	AuDebugOn(event->data_type != FSNOTIFY_EVENT_INODE);
 +
@@ -11366,7 +11341,7 @@
 +	}
 +}
 --- a/fs/aufs/hnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/hnotify.c	2012-03-11 05:01:22.570973560 +0000
++++ b/fs/aufs/hnotify.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,712 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -11478,7 +11453,7 @@
 +
 +	err = 0;
 +	if (unlikely(inode->i_ino == AUFS_ROOT_INO)) {
-+		pr_warning("branch root dir was changed\n");
++		pr_warn("branch root dir was changed\n");
 +		goto out;
 +	}
 +
@@ -11573,7 +11548,7 @@
 +
 +	err = 1;
 +	if (unlikely(inode->i_ino == AUFS_ROOT_INO)) {
-+		pr_warning("branch root dir was changed\n");
++		pr_warn("branch root dir was changed\n");
 +		err = 0;
 +		goto out;
 +	}
@@ -11629,7 +11604,7 @@
 +	if (IS_ROOT(dentry)
 +	    /* || (inode && inode->i_ino == AUFS_ROOT_INO) */
 +		) {
-+		pr_warning("branch root dir was changed\n");
++		pr_warn("branch root dir was changed\n");
 +		return 0;
 +	}
 +
@@ -11728,8 +11703,8 @@
 +	if (au_ftest_hnjob(a->flags, MNTPNT)
 +	    && a->dentry
 +	    && d_mountpoint(a->dentry))
-+		pr_warning("mount-point %.*s is removed or renamed\n",
-+			   AuDLNPair(a->dentry));
++		pr_warn("mount-point %.*s is removed or renamed\n",
++			AuDLNPair(a->dentry));
 +
 +	return 0;
 +}
@@ -11791,7 +11766,7 @@
 +		goto out;
 +
 +	if (unlikely(inode->i_ino == AUFS_ROOT_INO)) {
-+		pr_warning("wrong root branch\n");
++		pr_warn("wrong root branch\n");
 +		iput(inode);
 +		inode = NULL;
 +		goto out;
@@ -12081,8 +12056,8 @@
 +		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-06-04 21:49:59.854840268 +0100
-@@ -0,0 +1,993 @@
++++ b/fs/aufs/i_op.c	2012-07-22 01:31:00.162115458 +0100
+@@ -0,0 +1,1014 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -12788,7 +12763,8 @@
 +			goto out_unlock;
 +	} else if ((ia->ia_valid & (ATTR_UID | ATTR_GID))
 +		   && (ia->ia_valid & ATTR_CTIME)) {
-+		err = security_path_chown(&a->h_path, ia->ia_uid, ia->ia_gid);
++		err = security_path_chown(&a->h_path, vfsub_ia_uid(ia),
++					  vfsub_ia_gid(ia));
 +		if (unlikely(err))
 +			goto out_unlock;
 +	}
@@ -12838,8 +12814,8 @@
 +	unsigned int n;
 +
 +	inode->i_mode = st->mode;
-+	inode->i_uid = st->uid;
-+	inode->i_gid = st->gid;
++	i_uid_write(inode, st->uid);
++	i_gid_write(inode, st->gid);
 +	inode->i_atime = st->atime;
 +	inode->i_mtime = st->mtime;
 +	inode->i_ctime = st->ctime;
@@ -13036,11 +13012,25 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static void aufs_truncate_range(struct inode *inode __maybe_unused,
-+				loff_t start __maybe_unused,
-+				loff_t end __maybe_unused)
++static int aufs_update_time(struct inode *inode, struct timespec *ts, int flags)
 +{
-+	AuUnsupport();
++	int err;
++	struct super_block *sb;
++	struct inode *h_inode;
++
++	sb = inode->i_sb;
++	/* mmap_sem might be acquired already, cf. aufs_mmap() */
++	lockdep_off();
++	si_read_lock(sb, AuLock_FLUSH);
++	ii_write_lock_child(inode);
++	lockdep_on();
++	h_inode = au_h_iptr(inode, au_ibstart(inode));
++	err = vfsub_update_time(h_inode, ts, flags);
++	lockdep_off();
++	ii_write_unlock(inode);
++	si_read_unlock(sb);
++	lockdep_on();
++	return err;
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -13049,9 +13039,12 @@
 +	.permission	= aufs_permission,
 +	.setattr	= aufs_setattr,
 +	.getattr	= aufs_getattr,
++
 +	.readlink	= aufs_readlink,
 +	.follow_link	= aufs_follow_link,
-+	.put_link	= aufs_put_link
++	.put_link	= aufs_put_link,
++
++	/* .update_time	= aufs_update_time */
 +};
 +
 +struct inode_operations aufs_dir_iop = {
@@ -13067,14 +13060,17 @@
 +
 +	.permission	= aufs_permission,
 +	.setattr	= aufs_setattr,
-+	.getattr	= aufs_getattr
++	.getattr	= aufs_getattr,
++
++	.update_time	= aufs_update_time
 +};
 +
 +struct inode_operations aufs_iop = {
 +	.permission	= aufs_permission,
 +	.setattr	= aufs_setattr,
 +	.getattr	= aufs_getattr,
-+	.truncate_range	= aufs_truncate_range
++
++	.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
@@ -14273,7 +14269,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-03-11 05:01:22.570973560 +0000
++++ b/fs/aufs/i_op_ren.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,1026 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -14531,8 +14527,8 @@
 +	    || au_test_fs_remote(a->h_dst->d_sb)) {
 +		err = au_whtmp_rmdir(dir, a->btgt, a->h_dst, &a->whlist);
 +		if (unlikely(err))
-+			pr_warning("failed removing whtmp dir %.*s (%d), "
-+				   "ignored.\n", AuDLNPair(a->h_dst), err);
++			pr_warn("failed removing whtmp dir %.*s (%d), "
++				"ignored.\n", AuDLNPair(a->h_dst), err);
 +	} else {
 +		au_nhash_wh_free(&a->thargs->whlist);
 +		a->thargs->whlist = a->whlist;
@@ -15569,7 +15565,7 @@
 +	AuRwDestroy(&iinfo->ii_rwsem);
 +}
 --- a/fs/aufs/inode.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/inode.c	2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/inode.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,471 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -16029,7 +16025,7 @@
 +
 +int au_test_h_perm(struct inode *h_inode, int mask)
 +{
-+	if (!current_fsuid())
++	if (current_fsuid() == GLOBAL_ROOT_GID)
 +		return 0;
 +	return inode_permission(h_inode, mask);
 +}
@@ -16805,7 +16801,7 @@
 +#endif
 +#endif
 --- a/fs/aufs/loop.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/loop.c	2012-01-10 02:15:56.557456016 +0000
++++ b/fs/aufs/loop.c	2012-07-22 01:31:00.162115458 +0100
 @@ -0,0 +1,133 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -16916,8 +16912,8 @@
 +
 +pr:
 +	spin_unlock(&spin);
-+	pr_warning("you may want to try another patch for loopback file "
-+		   "on %s(0x%lx) branch\n", au_sbtype(h_sb), magic);
++	pr_warn("you may want to try another patch for loopback file "
++		"on %s(0x%lx) branch\n", au_sbtype(h_sb), magic);
 +}
 +
 +int au_loopback_init(void)
@@ -17358,7 +17354,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-01-10 02:15:56.561456041 +0000
++++ b/fs/aufs/opts.c	2012-07-22 01:31:00.166115467 +0100
 @@ -0,0 +1,1677 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -17576,7 +17572,7 @@
 +		else {
 +			if (p)
 +				*p = '+';
-+			pr_warning("ignored branch attribute %s\n", str);
++			pr_warn("ignored branch attribute %s\n", str);
 +			break;
 +		}
 +		if (p)
@@ -17599,7 +17595,7 @@
 +	if (!val) {
 +		if (p)
 +			*p = '+';
-+		pr_warning("ignored branch permission %s\n", perm);
++		pr_warn("ignored branch permission %s\n", perm);
 +		val = AuBrPerm_RO;
 +		goto out;
 +	}
@@ -18485,7 +18481,7 @@
 +			break;
 +
 +		case Opt_ignore:
-+			pr_warning("ignored %s\n", opt_str);
++			pr_warn("ignored %s\n", opt_str);
 +			/*FALLTHROUGH*/
 +		case Opt_ignore_silent:
 +			skipped = 1;
@@ -18821,14 +18817,14 @@
 +
 +	if (!(sb_flags & MS_RDONLY)) {
 +		if (unlikely(!au_br_writable(au_sbr_perm(sb, 0))))
-+			pr_warning("first branch should be rw\n");
++			pr_warn("first branch should be rw\n");
 +		if (unlikely(au_opt_test(sbinfo->si_mntflags, SHWH)))
-+			pr_warning("shwh should be used with ro\n");
++			pr_warn("shwh should be used with ro\n");
 +	}
 +
 +	if (au_opt_test((sbinfo->si_mntflags | pending), UDBA_HNOTIFY)
 +	    && !au_opt_test(sbinfo->si_mntflags, XINO))
-+		pr_warning("udba=*notify requires xino\n");
++		pr_warn("udba=*notify requires xino\n");
 +
 +	err = 0;
 +	root = sb->s_root;
@@ -19250,8 +19246,8 @@
 +#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-01-10 02:15:56.561456041 +0000
-@@ -0,0 +1,515 @@
++++ b/fs/aufs/plink.c	2012-07-22 01:31:00.166115467 +0100
+@@ -0,0 +1,511 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -19482,9 +19478,7 @@
 +	struct inode *h_dir;
 +	int wkq_err;
 +	char a[PLINK_NAME_LEN];
-+	struct qstr tgtname = {
-+		.name	= a
-+	};
++	struct qstr tgtname = QSTR_INIT(a, 0);
 +
 +	AuDebugOn(au_plink_maint(inode->i_sb, AuLock_NOPLM));
 +
@@ -19493,7 +19487,7 @@
 +	h_dir = h_parent->d_inode;
 +	tgtname.len = plink_name(a, sizeof(a), inode, bindex);
 +
-+	if (current_fsuid()) {
++	if (current_fsuid() != GLOBAL_ROOT_GID) {
 +		struct au_do_plink_lkup_args args = {
 +			.errp		= &h_dentry,
 +			.tgtname	= &tgtname,
@@ -19570,9 +19564,7 @@
 +	struct dentry *h_parent;
 +	struct inode *h_dir;
 +	char a[PLINK_NAME_LEN];
-+	struct qstr tgtname = {
-+		.name = a
-+	};
++	struct qstr tgtname = QSTR_INIT(a, 0);
 +
 +	wbr = au_sbr(inode->i_sb, bindex)->br_wbr;
 +	h_parent = wbr->wbr_plink;
@@ -19580,7 +19572,7 @@
 +	tgtname.len = plink_name(a, sizeof(a), inode, bindex);
 +
 +	/* always superio. */
-+	if (current_fsuid()) {
++	if (current_fsuid() != GLOBAL_ROOT_GID) {
 +		struct do_whplink_args args = {
 +			.errp		= &err,
 +			.tgt		= &tgtname,
@@ -19678,7 +19670,7 @@
 +
 +out:
 +	if (unlikely(err)) {
-+		pr_warning("err %d, damaged pseudo link.\n", err);
++		pr_warn("err %d, damaged pseudo link.\n", err);
 +		if (tmp) {
 +			au_spl_del_rcu(&tmp->list, &sbinfo->si_plink);
 +			call_rcu(&tmp->rcu, do_put_plink_rcu);
@@ -20923,6 +20915,101 @@
 +	p = radix_tree_delete(&sbinfo->au_si_pid.tree, current->pid);
 +	spin_unlock(&sbinfo->au_si_pid.tree_lock);
 +}
+--- a/fs/aufs/security.c	1970-01-01 01:00:00.000000000 +0100
++++ b/fs/aufs/security.c	2012-07-22 01:31:00.166115467 +0100
+@@ -0,0 +1,92 @@
++/*
++ * Copyright (C) 2012 Junjiro R. Okajima
++ *
++ * This program, aufs is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ */
++
++/*
++ * securityf_file_mmap
++ */
++
++#include <linux/mman.h>
++#include <linux/security.h>
++#include "aufs.h"
++
++/* cf. linux/include/linux/mman.h: calc_vm_prot_bits() */
++#define AuConv_VM_PROT(f, b)	_calc_vm_trans(f, VM_##b, PROT_##b)
++
++static unsigned long au_arch_prot_conv(unsigned long flags)
++{
++	/* currently ppc64 only */
++#ifdef CONFIG_PPC64
++	/* cf. linux/arch/powerpc/include/asm/mman.h */
++	AuDebugOn(arch_calc_vm_prot_bits(-1) != VM_SAO);
++	return AuConv_VM_PROT(flags, SAO);
++#else
++	AuDebugOn(arch_calc_vm_prot_bits(-1));
++	return 0;
++#endif
++}
++
++static unsigned long au_prot_conv(unsigned long flags)
++{
++	return AuConv_VM_PROT(flags, READ)
++		| AuConv_VM_PROT(flags, WRITE)
++		| AuConv_VM_PROT(flags, EXEC)
++		| au_arch_prot_conv(flags);
++}
++
++/* cf. linux/include/linux/mman.h: calc_vm_flag_bits() */
++#define AuConv_VM_MAP(f, b)	_calc_vm_trans(f, VM_##b, MAP_##b)
++
++static unsigned long au_flag_conv(unsigned long flags)
++{
++	return AuConv_VM_MAP(flags, GROWSDOWN)
++		| AuConv_VM_MAP(flags, DENYWRITE)
++		| AuConv_VM_MAP(flags, EXECUTABLE)
++		| AuConv_VM_MAP(flags, LOCKED);
++}
++
++struct au_security_mmap_file_args {
++	int *errp;
++	struct file *h_file;
++	struct vm_area_struct *vma;
++};
++
++/*
++ * unnecessary to call security_mmap_file() since it doesn't have file as its
++ * argument.
++ */
++static void au_call_security_mmap_file(void *args)
++{
++	struct au_security_mmap_file_args *a = args;
++	*a->errp = security_mmap_file(a->h_file, au_prot_conv(a->vma->vm_flags),
++				      au_flag_conv(a->vma->vm_flags));
++}
++
++int au_security_mmap_file(struct file *h_file, struct vm_area_struct *vma)
++{
++	int err, wkq_err;
++	struct au_security_mmap_file_args args = {
++		.errp	= &err,
++		.h_file	= h_file,
++		.vma	= vma
++	};
++
++	wkq_err = au_wkq_wait(au_call_security_mmap_file, &args);
++	if (unlikely(wkq_err))
++		err = wkq_err;
++	return err;
++}
 --- 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
 @@ -0,0 +1,62 @@
@@ -22718,7 +22805,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-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/sysfs.c	2012-07-22 01:31:00.166115467 +0100
 @@ -0,0 +1,257 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22973,12 +23060,12 @@
 +			 "%d", bindex);
 +		err = sysfs_create_file(kobj, &br->br_attr);
 +		if (unlikely(err))
-+			pr_warning("failed %s under sysfs(%d)\n",
-+				   br->br_name, err);
++			pr_warn("failed %s under sysfs(%d)\n",
++				br->br_name, err);
 +	}
 +}
 --- a/fs/aufs/sysrq.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/sysrq.c	2012-01-10 02:15:56.569456073 +0000
++++ b/fs/aufs/sysrq.c	2012-07-22 01:31:00.166115467 +0100
 @@ -0,0 +1,148 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -23066,14 +23153,14 @@
 +	}
 +#endif
 +	printk(KERN_WARNING AUFS_NAME ": files\n");
-+	lg_global_lock(files_lglock);
++	lg_global_lock(&files_lglock);
 +	do_file_list_for_each_entry(sb, file) {
 +		umode_t mode;
 +		mode = file->f_dentry->d_inode->i_mode;
 +		if (!special_file(mode) || au_special_file(mode))
 +			au_dpri_file(file);
 +	} while_file_list_for_each_entry;
-+	lg_global_unlock(files_lglock);
++	lg_global_unlock(&files_lglock);
 +	printk(KERN_WARNING AUFS_NAME ": done\n");
 +
 +	au_plevel = plevel;
@@ -24852,8 +24939,8 @@
 +	return err;
 +}
 --- a/fs/aufs/vfsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/vfsub.h	2012-06-04 21:49:59.858840280 +0100
-@@ -0,0 +1,232 @@
++++ b/fs/aufs/vfsub.h	2012-07-22 01:31:00.166115467 +0100
+@@ -0,0 +1,252 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -24887,12 +24974,12 @@
 +
 +/* copied from linux/fs/internal.h */
 +/* todo: BAD approach!! */
-+DECLARE_BRLOCK(vfsmount_lock);
++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 */
-+DECLARE_LGLOCK(files_lglock);
++extern struct lglock files_lglock;
 +#ifdef CONFIG_SMP
 +/*
 + * These macros iterate all files on all CPUs for a given superblock.
@@ -24958,6 +25045,19 @@
 +
 +/* ---------------------------------------------------------------------- */
 +
++/* cf. i_[ug]id_read() in linux/include/fs.h */
++static inline uid_t vfsub_ia_uid(struct iattr *ia)
++{
++	return from_kuid(&init_user_ns, ia->ia_uid);
++}
++
++static inline gid_t vfsub_ia_gid(struct iattr *ia)
++{
++	return from_kgid(&init_user_ns, ia->ia_gid);
++}
++
++/* ---------------------------------------------------------------------- */
++
 +int vfsub_update_h_iattr(struct path *h_path, int *did);
 +struct file *vfsub_dentry_open(struct path *path, int flags);
 +struct file *vfsub_filp_open(const char *path, int oflags, int mode);
@@ -25027,6 +25127,13 @@
 +	vfsub_update_h_iattr(&h_path, /*did*/NULL); /*ignore*/
 +}
 +
++static inline int vfsub_update_time(struct inode *h_inode, struct timespec *ts,
++				    int flags)
++{
++	return update_time(h_inode, ts, flags);
++	/* no vfsub_update_h_iattr() since we don't have struct path */
++}
++
 +long vfsub_splice_to(struct file *in, loff_t *ppos,
 +		     struct pipe_inode_info *pipe, size_t len,
 +		     unsigned int flags);
@@ -25790,8 +25897,8 @@
 +	}
 +};
 --- a/fs/aufs/whout.c	1970-01-01 01:00:00.000000000 +0100
-+++ b/fs/aufs/whout.c	2012-01-10 02:15:56.573456100 +0000
-@@ -0,0 +1,1049 @@
++++ b/fs/aufs/whout.c	2012-07-22 01:31:00.166115467 +0100
+@@ -0,0 +1,1041 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
 + *
@@ -25822,10 +25929,8 @@
 + * If a directory contains this file, then it is opaque.  We start with the
 + * .wh. flag so that it is blocked by lookup.
 + */
-+static struct qstr diropq_name = {
-+	.name = AUFS_WH_DIROPQ,
-+	.len = sizeof(AUFS_WH_DIROPQ) - 1
-+};
++static struct qstr diropq_name = QSTR_INIT(AUFS_WH_DIROPQ,
++					   sizeof(AUFS_WH_DIROPQ) - 1);
 +
 +/*
 + * generate whiteout name, which is NOT terminated by NULL.
@@ -25950,7 +26055,7 @@
 +			goto out_name;
 +		dput(dentry);
 +	}
-+	/* pr_warning("could not get random name\n"); */
++	/* pr_warn("could not get random name\n"); */
 +	dentry = ERR_PTR(-EEXIST);
 +	AuDbg("%.*s\n", AuLNPair(&qs));
 +	BUG();
@@ -26008,7 +26113,7 @@
 +	 * this may be a violation of unix fs semantics.
 +	 */
 +	force = (h_dir->i_mode & S_ISVTX)
-+		&& h_path->dentry->d_inode->i_uid != current_fsuid();
++		&& !uid_eq(current_fsuid(), h_path->dentry->d_inode->i_uid);
 +	return vfsub_unlink(h_dir, h_path, force);
 +}
 +
@@ -26068,8 +26173,8 @@
 +		mnt_drop_write(whpath->mnt);
 +	}
 +	if (unlikely(err))
-+		pr_warning("failed removing %.*s (%d), ignored.\n",
-+			   AuDLNPair(whpath->dentry), err);
++		pr_warn("failed removing %.*s (%d), ignored.\n",
++			AuDLNPair(whpath->dentry), err);
 +}
 +
 +static int test_linkable(struct dentry *h_root)
@@ -26242,18 +26347,12 @@
 +	struct inode *h_dir;
 +	struct au_wbr *wbr = br->br_wbr;
 +	static const struct qstr base_name[] = {
-+		[AuBrWh_BASE] = {
-+			.name	= AUFS_BASE_NAME,
-+			.len	= sizeof(AUFS_BASE_NAME) - 1
-+		},
-+		[AuBrWh_PLINK] = {
-+			.name	= AUFS_PLINKDIR_NAME,
-+			.len	= sizeof(AUFS_PLINKDIR_NAME) - 1
-+		},
-+		[AuBrWh_ORPH] = {
-+			.name	= AUFS_ORPHDIR_NAME,
-+			.len	= sizeof(AUFS_ORPHDIR_NAME) - 1
-+		}
++		[AuBrWh_BASE] = QSTR_INIT(AUFS_BASE_NAME,
++					  sizeof(AUFS_BASE_NAME) - 1),
++		[AuBrWh_PLINK] = QSTR_INIT(AUFS_PLINKDIR_NAME,
++					   sizeof(AUFS_PLINKDIR_NAME) - 1),
++		[AuBrWh_ORPH] = QSTR_INIT(AUFS_ORPHDIR_NAME,
++					  sizeof(AUFS_ORPHDIR_NAME) - 1)
 +	};
 +	struct au_wh_base base[] = {
 +		[AuBrWh_BASE] = {
@@ -26373,8 +26472,8 @@
 +			mnt_drop_write(a->br->br_mnt);
 +		}
 +	} else {
-+		pr_warning("%.*s is moved, ignored\n",
-+			   AuDLNPair(wbr->wbr_whbase));
++		pr_warn("%.*s is moved, ignored\n",
++			AuDLNPair(wbr->wbr_whbase));
 +		err = 0;
 +	}
 +	dput(wbr->wbr_whbase);
@@ -26765,8 +26864,8 @@
 +		return 0; /* success */
 +	}
 +
-+	pr_warning("failed removing %.*s(%d), ignored\n",
-+		   AuDLNPair(wh_dentry), err);
++	pr_warn("failed removing %.*s(%d), ignored\n",
++		AuDLNPair(wh_dentry), err);
 +	return err;
 +}
 +
@@ -26836,8 +26935,8 @@
 +	args->wh_dentry = dget(wh_dentry);
 +	wkq_err = au_wkq_nowait(call_rmdir_whtmp, args, sb, /*flags*/0);
 +	if (unlikely(wkq_err)) {
-+		pr_warning("rmdir error %.*s (%d), ignored\n",
-+			   AuDLNPair(wh_dentry), wkq_err);
++		pr_warn("rmdir error %.*s (%d), ignored\n",
++			AuDLNPair(wh_dentry), wkq_err);
 +		au_whtmp_rmdir_free(args);
 +	}
 +}
@@ -26933,7 +27032,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-01-10 02:15:56.573456100 +0000
++++ b/fs/aufs/wkq.c	2012-07-22 01:31:00.166115467 +0100
 @@ -0,0 +1,214 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -26983,7 +27082,7 @@
 +{
 +	struct au_wkinfo *wkinfo = container_of(wk, struct au_wkinfo, wk);
 +
-+	AuDebugOn(current_fsuid());
++	AuDebugOn(current_fsuid() != GLOBAL_ROOT_GID);
 +	AuDebugOn(rlimit(RLIMIT_FSIZE) != RLIM_INFINITY);
 +
 +	wkinfo->func(wkinfo->args);
@@ -27245,7 +27344,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-01-10 02:15:56.573456100 +0000
++++ b/fs/aufs/xino.c	2012-07-22 01:31:00.166115467 +0100
 @@ -0,0 +1,1264 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -27565,7 +27664,7 @@
 +
 +	ii_read_unlock(dir);
 +	if (unlikely(err))
-+		pr_warning("err b%d, (%d)\n", bindex, err);
++		pr_warn("err b%d, (%d)\n", bindex, err);
 +	atomic_dec(&br->br_xino_running);
 +	atomic_dec(&br->br_count);
 +	si_write_unlock(sb);
@@ -28512,7 +28611,7 @@
 +	return err;
 +}
 --- a/include/linux/aufs_type.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/aufs_type.h	2012-06-04 21:49:59.858840280 +0100
++++ b/include/linux/aufs_type.h	2012-07-22 01:31:00.166115467 +0100
 @@ -0,0 +1,233 @@
 +/*
 + * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -28555,7 +28654,7 @@
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION	"3.4-20120521"
++#define AUFS_VERSION	"3.x-rcN-20120618"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')

Modified: dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-base.patch
==============================================================================
--- dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-base.patch	Sat Jul 21 23:32:14 2012	(r19270)
+++ dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-base.patch	Sun Jul 22 00:33:36 2012	(r19271)
@@ -1,10 +1,23 @@
-aufs3.4 base patch
+aufs3.x-rcN base patch
 
+diff --git a/fs/inode.c b/fs/inode.c
+index c99163b..7f772fd 100644
+--- a/fs/inode.c
++++ b/fs/inode.c
+@@ -1491,7 +1491,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
+  * This does the actual work of updating an inodes time or version.  Must have
+  * had called mnt_want_write() before calling this.
+  */
+-static int update_time(struct inode *inode, struct timespec *time, int flags)
++int update_time(struct inode *inode, struct timespec *time, int flags)
+ {
+ 	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 c427919..7ff959b 100644
+index 7d69419..18c9782 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -1831,7 +1831,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
+@@ -1864,7 +1864,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
   * needs parent already locked. Doesn't follow mounts.
   * SMP-safe.
   */
@@ -14,10 +27,10 @@
  	return __lookup_hash(&nd->last, nd->path.dentry, nd);
  }
 diff --git a/fs/splice.c b/fs/splice.c
-index f847684..f871233 100644
+index c9f1318..490239f 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1084,8 +1084,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1086,8 +1086,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
  /*
   * Attempt to initiate a splice from pipe to file.
   */
@@ -28,7 +41,7 @@
  {
  	ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
  				loff_t *, size_t, unsigned int);
-@@ -1112,9 +1112,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1114,9 +1114,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.
   */
@@ -41,6 +54,18 @@
  {
  	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
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -2591,6 +2591,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);
+ 
++extern int update_time(struct inode *, struct timespec *, int);
+ 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

Modified: dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch
==============================================================================
--- dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch	Sat Jul 21 23:32:14 2012	(r19270)
+++ dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-kbuild.patch	Sun Jul 22 00:33:36 2012	(r19271)
@@ -1,4 +1,4 @@
-aufs3.4 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 3c9b616..8704efa 100644
+index 8760be3..a1b8446 100644
 --- a/include/linux/Kbuild
 +++ b/include/linux/Kbuild
 @@ -66,6 +66,7 @@ header-y += atmppp.h

Modified: dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch
==============================================================================
--- dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch	Sat Jul 21 23:32:14 2012	(r19270)
+++ dists/trunk/linux/debian/patches/features/all/aufs3/aufs3-standalone.patch	Sun Jul 22 00:33:36 2012	(r19271)
@@ -1,10 +1,18 @@
-aufs3.4 standalone patch
+aufs3.x-rcN standalone patch
 
 diff --git a/fs/file_table.c b/fs/file_table.c
-index 70f2a0f..146a3d7 100644
+index a305d9e..6a768be 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
-@@ -442,6 +442,8 @@ void file_sb_list_del(struct file *file)
+@@ -35,6 +35,7 @@ struct files_stat_struct files_stat = {
+ };
+ 
+ DEFINE_LGLOCK(files_lglock);
++EXPORT_SYMBOL_GPL(files_lglock);
+ 
+ /* 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)
  	}
  }
  
@@ -14,7 +22,7 @@
  
  /*
 diff --git a/fs/inode.c b/fs/inode.c
-index 9f4f5fe..bb0f3ba 100644
+index 7f772fd..e789d2f 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@@ -25,11 +33,19 @@
  
  /*
   * Empty aops. Can be used for the cases where the user does not
+@@ -1507,6 +1508,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
+ 	mark_inode_dirty_sync(inode);
+ 	return 0;
+ }
++EXPORT_SYMBOL_GPL(update_time);
+ 
+ /**
+  *	touch_atime	-	update the access time
 diff --git a/fs/namei.c b/fs/namei.c
-index 7ff959b..b170167 100644
+index 18c9782..f09edf3 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -1835,6 +1835,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
+@@ -1868,6 +1868,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
  {
  	return __lookup_hash(&nd->last, nd->path.dentry, nd);
  }
@@ -38,10 +54,18 @@
  /**
   * lookup_one_len - filesystem helper to lookup single pathname component
 diff --git a/fs/namespace.c b/fs/namespace.c
-index e608199..38fcc2e 100644
+index 1e4a5fe..06aa768 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -1339,6 +1339,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -50,6 +50,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
+  * tree or hash is modified or when a vfsmount structure is modified.
+  */
+ DEFINE_BRLOCK(vfsmount_lock);
++EXPORT_SYMBOL_GPL(vfsmount_lock);
+ 
+ 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,
  	}
  	return 0;
  }
@@ -111,7 +135,7 @@
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index 5720854..ec59242 100644
+index d6c79a0..9004a15 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,
@@ -123,10 +147,10 @@
  static long do_sys_truncate(const char __user *pathname, loff_t length)
  {
 diff --git a/fs/splice.c b/fs/splice.c
-index f871233..70f5481 100644
+index 490239f..701d34a 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1108,6 +1108,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1110,6 +1110,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  
  	return splice_write(pipe, out, ppos, len, flags);
  }
@@ -134,7 +158,7 @@
  
  /*
   * Attempt to initiate a splice from a file to a pipe.
-@@ -1134,6 +1135,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1136,6 +1137,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  
  	return splice_read(in, ppos, pipe, len, flags);
  }
@@ -143,16 +167,23 @@
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/security/commoncap.c b/security/commoncap.c
-index 71a166a..5d63aac 100644
+index 6dbae46..9f4f29a 100644
 --- a/security/commoncap.c
 +++ b/security/commoncap.c
-@@ -972,3 +972,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot,
+@@ -979,9 +979,11 @@ int cap_mmap_addr(unsigned long addr)
  	}
  	return ret;
  }
-+EXPORT_SYMBOL_GPL(cap_file_mmap);
++EXPORT_SYMBOL_GPL(cap_mmap_addr);
+ 
+ int cap_mmap_file(struct file *file, unsigned long reqprot,
+ 		  unsigned long prot, unsigned long flags)
+ {
+ 	return 0;
+ }
++EXPORT_SYMBOL_GPL(cap_mmap_file);
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index c43a332..0c37289 100644
+index 442204c..e644a1c 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
 @@ -7,6 +7,7 @@
@@ -163,7 +194,7 @@
  #include <linux/list.h>
  #include <linux/uaccess.h>
  #include <linux/seq_file.h>
-@@ -499,6 +500,7 @@ found:
+@@ -493,6 +494,7 @@ found:
  
  	return -EPERM;
  }
@@ -172,10 +203,10 @@
  int devcgroup_inode_mknod(int mode, dev_t dev)
  {
 diff --git a/security/security.c b/security/security.c
-index bf619ff..60b996a 100644
+index 3efc9b1..c7afd35 100644
 --- a/security/security.c
 +++ b/security/security.c
-@@ -380,6 +380,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
+@@ -383,6 +383,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
  		return 0;
  	return security_ops->path_rmdir(dir, dentry);
  }
@@ -183,7 +214,7 @@
  
  int security_path_unlink(struct path *dir, struct dentry *dentry)
  {
-@@ -396,6 +397,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
+@@ -399,6 +400,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
  		return 0;
  	return security_ops->path_symlink(dir, dentry, old_name);
  }
@@ -191,7 +222,7 @@
  
  int security_path_link(struct dentry *old_dentry, struct path *new_dir,
  		       struct dentry *new_dentry)
-@@ -404,6 +406,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
+@@ -407,6 +409,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
  		return 0;
  	return security_ops->path_link(old_dentry, new_dir, new_dentry);
  }
@@ -199,7 +230,7 @@
  
  int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
  			 struct path *new_dir, struct dentry *new_dentry)
-@@ -422,6 +425,7 @@ int security_path_truncate(struct path *path)
+@@ -425,6 +428,7 @@ int security_path_truncate(struct path *path)
  		return 0;
  	return security_ops->path_truncate(path);
  }
@@ -207,7 +238,7 @@
  
  int security_path_chmod(struct path *path, umode_t mode)
  {
-@@ -429,6 +433,7 @@ int security_path_chmod(struct path *path, umode_t mode)
+@@ -432,6 +436,7 @@ int security_path_chmod(struct path *path, umode_t mode)
  		return 0;
  	return security_ops->path_chmod(path, mode);
  }
@@ -215,7 +246,7 @@
  
  int security_path_chown(struct path *path, uid_t uid, gid_t gid)
  {
-@@ -436,6 +441,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid)
+@@ -439,6 +444,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid)
  		return 0;
  	return security_ops->path_chown(path, uid, gid);
  }
@@ -223,7 +254,7 @@
  
  int security_path_chroot(struct path *path)
  {
-@@ -512,6 +518,7 @@ int security_inode_readlink(struct dentry *dentry)
+@@ -515,6 +521,7 @@ int security_inode_readlink(struct dentry *dentry)
  		return 0;
  	return security_ops->inode_readlink(dentry);
  }
@@ -231,7 +262,7 @@
  
  int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
  {
-@@ -526,6 +533,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -529,6 +536,7 @@ int security_inode_permission(struct inode *inode, int mask)
  		return 0;
  	return security_ops->inode_permission(inode, mask);
  }
@@ -239,7 +270,7 @@
  
  int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  {
-@@ -641,6 +649,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -644,6 +652,7 @@ int security_file_permission(struct file *file, int mask)
  
  	return fsnotify_perm(file, mask);
  }
@@ -247,11 +278,11 @@
  
  int security_file_alloc(struct file *file)
  {
-@@ -668,6 +677,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot,
+@@ -704,6 +713,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
  		return ret;
  	return ima_file_mmap(file, prot);
  }
-+EXPORT_SYMBOL_GPL(security_file_mmap);
++EXPORT_SYMBOL_GPL(security_mmap_file);
  
- int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,
- 			    unsigned long prot)
+ int security_mmap_addr(unsigned long addr)
+ {

Modified: dists/trunk/linux/debian/patches/series
==============================================================================
--- dists/trunk/linux/debian/patches/series	Sat Jul 21 23:32:14 2012	(r19270)
+++ dists/trunk/linux/debian/patches/series	Sun Jul 22 00:33:36 2012	(r19271)
@@ -8,14 +8,14 @@
 
 # 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
+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/aufs3-fix-export-__devcgroup_inode_permission.patch
 
 bugfix/ia64/hardcode-arch-script-output.patch
 bugfix/mips/disable-advansys.patch



More information about the Kernel-svn-changes mailing list