[packages/kernel] - builds now (without vserver)
arekm
arekm at pld-linux.org
Sun Jul 22 22:42:25 CEST 2012
commit 0c3ec466e69be22e05fbcda066466fef09e36a68
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Jul 22 22:42:18 2012 +0200
- builds now (without vserver)
kernel-apparmor.patch | 6 +-
kernel-aufs3.patch | 757 +++++++++++++++++++++++++++++-------------------
kernel-esfq.patch | 4 +-
kernel-multiarch.config | 2 +-
kernel-unionfs.patch | 6 +-
5 files changed, 465 insertions(+), 310 deletions(-)
---
diff --git a/kernel-apparmor.patch b/kernel-apparmor.patch
index a22e790..49f4be3 100644
--- a/kernel-apparmor.patch
+++ b/kernel-apparmor.patch
@@ -684,9 +684,9 @@ index 0000000..084232b
+ struct apparmor_audit_data aad = { };
+ struct lsm_network_audit net = { };
+ if (sk) {
-+ COMMON_AUDIT_DATA_INIT(&sa, NET);
++ sa.type = LSM_AUDIT_DATA_NET;
+ } else {
-+ COMMON_AUDIT_DATA_INIT(&sa, NONE);
++ sa.type = LSM_AUDIT_DATA_NONE;
+ }
+ /* todo fill in socket addr info */
+ sa.aad = &aad;
@@ -1372,7 +1372,7 @@ index 0000000..63d8493
+ complain_error(error) : error;
+ }
+
-+ COMMON_AUDIT_DATA_INIT(&sa, NONE);
++ sa.type = LSM_AUDIT_DATA_NONE;
+ sa.aad = &aad;
+ sa.aad->op = op;
+ sa.aad->name = name;
diff --git a/kernel-aufs3.patch b/kernel-aufs3.patch
index b84ccd4..61ba23c 100644
--- a/kernel-aufs3.patch
+++ b/kernel-aufs3.patch
@@ -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 @@ index 2fb9779..abefac5 100644
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
@@ -33,13 +33,26 @@ index 3c9b616..8704efa 100644
header-y += auto_fs.h
header-y += auto_fs4.h
header-y += auxvec.h
-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.
*/
@@ -49,10 +62,10 @@ index c427919..7ff959b 100644
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.
*/
@@ -63,7 +76,7 @@ index f847684..f871233 100644
{
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.
*/
@@ -76,6 +89,18 @@ index f847684..f871233 100644
{
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
@@ -103,13 +128,21 @@ index 26e5b61..3ffef2f 100644
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags);
#endif
-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(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)
}
}
@@ -119,7 +152,7 @@ index 70f2a0f..146a3d7 100644
/*
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;
@@ -130,11 +163,19 @@ index 9f4f5fe..bb0f3ba 100644
/*
* 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(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);
}
@@ -143,10 +184,18 @@ index 7ff959b..b170167 100644
/**
* 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(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;
}
@@ -216,7 +265,7 @@ index f104d56..54f36db 100644
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,
@@ -228,10 +277,10 @@ index 5720854..ec59242 100644
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);
}
@@ -239,7 +288,7 @@ index f871233..70f5481 100644
/*
* 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);
}
@@ -248,16 +297,23 @@ index f871233..70f5481 100644
/**
* 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(cap_file_mmap);
++EXPORT_SYMBOL(cap_mmap_addr);
+
+ int cap_mmap_file(struct file *file, unsigned long reqprot,
+ unsigned long prot, unsigned long flags)
+ {
+ return 0;
+ }
++EXPORT_SYMBOL(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 @@
@@ -268,7 +324,7 @@ index c43a332..0c37289 100644
#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;
}
@@ -277,10 +333,10 @@ index c43a332..0c37289 100644
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);
}
@@ -288,7 +344,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -296,7 +352,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -304,7 +360,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -312,7 +368,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -320,7 +376,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -328,7 +384,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -336,7 +392,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -344,7 +400,7 @@ index bf619ff..60b996a 100644
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);
}
@@ -352,17 +408,17 @@ index bf619ff..60b996a 100644
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(security_file_mmap);
++EXPORT_SYMBOL(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)
+ {
diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Documentation/ABI/testing/debugfs-aufs
--- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/debugfs-aufs 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/ABI/testing/debugfs-aufs 2012-07-22 19:57:03.161004529 +0200
@@ -0,0 +1,37 @@
+What: /debug/aufs/si_<id>/
+Date: March 2009
@@ -403,7 +459,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Document
+ will be empty. About XINO files, see the aufs manual.
diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentation/ABI/testing/sysfs-aufs
--- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/sysfs-aufs 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/ABI/testing/sysfs-aufs 2012-07-22 19:57:03.161004529 +0200
@@ -0,0 +1,24 @@
+What: /sys/fs/aufs/si_<id>/
+Date: March 2009
@@ -431,7 +487,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
+ will be empty. About XINO files, see the aufs manual.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/01intro.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,162 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -597,7 +653,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
+about it. But currently I have implemented it in kernel space.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/02struct.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,226 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -827,7 +883,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
+dir, aufs reverts it after copy-up.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,106 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -937,7 +993,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
+ by over-mounting something (or another method).
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/04branch.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,76 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1017,7 +1073,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
+ same named entry on the upper branch.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,65 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1086,7 +1142,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx
+ copyup policy.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,47 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1137,7 +1193,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
+switching the approach.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/07export.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,59 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1200,7 +1256,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
+ lookup_one_len(), vfs_getattr(), encode_fh() and others.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,53 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1257,7 +1313,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
+initramfs will use it to replace the old one at the next boot.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,47 @@
+
+# Copyright (C) 2010-2011 Junjiro R. Okajima
@@ -1308,7 +1364,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin
+vm_operations_struct for regular files only.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt linux/Documentation/filesystems/aufs/design/99plan.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/99plan.txt 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/design/99plan.txt 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,96 @@
+
+# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1408,7 +1464,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt linu
+Otherwise from /new.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
--- /usr/share/empty/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README 2012-05-22 09:06:08.864125478 +0200
++++ linux/Documentation/filesystems/aufs/README 2012-07-22 19:57:03.161004529 +0200
@@ -0,0 +1,330 @@
+
+Aufs3 -- advanced multi layered unification filesystem version 3.x
@@ -1742,7 +1798,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
+# End: ;
diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
--- /usr/share/empty/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h 2012-05-22 09:06:08.864125478 +0200
++++ linux/fs/aufs/aufs.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -1806,7 +1862,7 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
+#endif /* __AUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
--- /usr/share/empty/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c 2012-05-22 09:06:08.864125478 +0200
++++ linux/fs/aufs/branch.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,1169 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -2061,14 +2117,14 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
+ 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:
@@ -2663,8 +2719,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
+ /* 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;
+}
@@ -2775,7 +2831,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
+
+ 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)
@@ -2786,7 +2842,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
+ AuDebugOn(n > max);
+ }
+ } while_file_list_for_each_entry;
-+ lg_global_unlock(files_lglock);
++ lg_global_unlock(&files_lglock);
+
+ return n;
+}
@@ -2979,7 +3035,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
+}
diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
--- /usr/share/empty/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h 2012-05-22 09:06:08.864125478 +0200
++++ linux/fs/aufs/branch.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,230 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -3213,7 +3269,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
+#endif /* __AUFS_BRANCH_H__ */
diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
--- /usr/share/empty/fs/aufs/conf.mk 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/conf.mk 2012-05-22 09:06:08.864125478 +0200
++++ linux/fs/aufs/conf.mk 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,38 @@
+
+AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
@@ -3255,7 +3311,7 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
+-include ${srctree}/${src}/conf_priv.mk
diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
--- /usr/share/empty/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c 2012-05-22 09:06:08.864125478 +0200
++++ linux/fs/aufs/cpup.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,1084 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -3403,7 +3459,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
+
+ 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);
+}
+
+/* ---------------------------------------------------------------------- */
@@ -4343,7 +4399,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
+}
diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
--- /usr/share/empty/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/cpup.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4428,7 +4484,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
+#endif /* __AUFS_CPUP_H__ */
diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
--- /usr/share/empty/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dbgaufs.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,334 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4766,7 +4822,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
+}
diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
--- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dbgaufs.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -4819,7 +4875,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
+#endif /* __DBGAUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
--- /usr/share/empty/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dcsub.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -5066,7 +5122,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
+}
diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
--- /usr/share/empty/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dcsub.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -5164,7 +5220,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
+#endif /* __AUFS_DCSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
--- /usr/share/empty/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/debug.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,489 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -5646,7 +5702,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
+ 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
@@ -5657,7 +5713,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
+}
diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
--- /usr/share/empty/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/debug.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -5724,7 +5780,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
+#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 { \
@@ -5903,7 +5959,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
+#endif /* __AUFS_DEBUG_H__ */
diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
--- /usr/share/empty/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dentry.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,1140 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -6253,8 +6309,8 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
+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;
@@ -6281,8 +6337,8 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
+{
+ 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
@@ -7047,7 +7103,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
+};
diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
--- /usr/share/empty/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dentry.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -7288,7 +7344,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
+#endif /* __AUFS_DENTRY_H__ */
diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
--- /usr/share/empty/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dinfo.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,543 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -7835,7 +7891,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
+}
diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
--- /usr/share/empty/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dir.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,636 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -8475,7 +8531,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
+};
diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
--- /usr/share/empty/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dir.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -8616,7 +8672,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
+#endif /* __AUFS_DIR_H__ */
diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
--- /usr/share/empty/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dynop.c 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,377 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -8997,7 +9053,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
+}
diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
--- /usr/share/empty/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/dynop.h 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -9077,8 +9133,8 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
+#endif /* __AUFS_DYNOP_H__ */
diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
--- /usr/share/empty/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c 2012-05-22 09:06:08.867458905 +0200
-@@ -0,0 +1,803 @@
++++ linux/fs/aufs/export.c 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,810 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -9367,9 +9423,9 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
+ };
+
+ 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);
@@ -9737,19 +9793,16 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
+
+/* ---------------------------------------------------------------------- */
+
-+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);
@@ -9757,49 +9810,58 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
+ }
+
+ 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;
@@ -9814,12 +9876,13 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
+ 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;
@@ -9884,7 +9947,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
+}
diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
--- /usr/share/empty/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/file.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,676 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -10564,8 +10627,8 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
+};
diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
--- /usr/share/empty/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h 2012-05-22 09:06:08.867458905 +0200
-@@ -0,0 +1,298 @@
++++ linux/fs/aufs/file.h 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,306 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -10649,6 +10712,14 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
+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);
@@ -10795,7 +10866,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
+{
+ 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))
+ ;
+}
@@ -10866,7 +10937,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
+#endif /* __AUFS_FILE_H__ */
diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
--- /usr/share/empty/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/finfo.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -11026,8 +11097,8 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
+}
diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
--- /usr/share/empty/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c 2012-05-22 09:06:08.867458905 +0200
-@@ -0,0 +1,729 @@
++++ linux/fs/aufs/f_op.c 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,692 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -11475,45 +11546,9 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
+ * 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);
@@ -11553,9 +11588,8 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
+ 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))
@@ -11759,8 +11793,8 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
+};
diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
--- /usr/share/empty/fs/aufs/f_op_sp.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op_sp.c 2012-05-22 09:06:08.867458905 +0200
-@@ -0,0 +1,298 @@
++++ linux/fs/aufs/f_op_sp.c 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,295 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -11837,9 +11871,6 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
+ /* 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;
+}
+
@@ -12061,7 +12092,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
+}
diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
--- /usr/share/empty/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/fstype.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,496 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -12561,8 +12592,8 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
+#endif /* __AUFS_FSTYPE_H__ */
diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
--- /usr/share/empty/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c 2012-05-22 09:06:08.867458905 +0200
-@@ -0,0 +1,260 @@
++++ linux/fs/aufs/hfsnotify.c 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -12708,10 +12739,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
+ 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);
+
@@ -12825,7 +12853,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
+};
diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
--- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/hfsplus.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -12886,7 +12914,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
+}
diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
--- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/hnotify.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -12998,7 +13026,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
+
+ 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;
+ }
+
@@ -13093,7 +13121,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
+
+ 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;
+ }
@@ -13149,7 +13177,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
+ 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;
+ }
+
@@ -13248,8 +13276,8 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
+ 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;
+}
@@ -13311,7 +13339,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
+ 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;
@@ -13602,7 +13630,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
+}
diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
--- /usr/share/empty/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/iinfo.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -13870,7 +13898,7 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
+}
diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
--- /usr/share/empty/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/inode.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,471 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -14330,7 +14358,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
+
+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);
+}
@@ -14345,7 +14373,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
+}
diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
--- /usr/share/empty/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/inode.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,560 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -14909,7 +14937,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
+#endif /* __AUFS_INODE_H__ */
diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
--- /usr/share/empty/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/ioctl.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -15109,7 +15137,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
+#endif
diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
--- /usr/share/empty/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/i_op_add.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,712 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -15825,8 +15853,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
+}
diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
--- /usr/share/empty/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c 2012-05-22 09:06:08.867458905 +0200
-@@ -0,0 +1,993 @@
++++ linux/fs/aufs/i_op.c 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,1014 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -16532,7 +16560,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
+ 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;
+ }
@@ -16582,8 +16611,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
+ 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;
@@ -16780,11 +16809,25 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
+
+/* ---------------------------------------------------------------------- */
+
-+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;
+}
+
+/* ---------------------------------------------------------------------- */
@@ -16793,9 +16836,12 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
+ .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 = {
@@ -16811,18 +16857,21 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
+
+ .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
+};
diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
--- /usr/share/empty/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/i_op_del.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,478 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -17304,7 +17353,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
+}
diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
--- /usr/share/empty/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c 2012-05-22 09:06:08.867458905 +0200
++++ linux/fs/aufs/i_op_ren.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,1026 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -17562,8 +17611,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
+ || 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;
@@ -18334,7 +18383,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
+}
diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
--- /usr/share/empty/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Kconfig 2012-05-22 09:06:08.864125478 +0200
++++ linux/fs/aufs/Kconfig 2012-07-22 19:57:03.161004531 +0200
@@ -0,0 +1,203 @@
+config AUFS_FS
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
@@ -18541,7 +18590,7 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
+endif
diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
--- /usr/share/empty/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/loop.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -18652,8 +18701,8 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
+
+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)
@@ -18678,7 +18727,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
+}
diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
--- /usr/share/empty/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/loop.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -18732,7 +18781,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
+#endif /* __AUFS_LOOP_H__ */
diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
--- /usr/share/empty/fs/aufs/magic.mk 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/magic.mk 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/magic.mk 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,54 @@
+
+# defined in ${srctree}/fs/fuse/inode.c
@@ -18790,8 +18839,8 @@ diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
+endif
diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
--- /usr/share/empty/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Makefile 2012-05-22 09:06:08.864125478 +0200
-@@ -0,0 +1,42 @@
++++ linux/fs/aufs/Makefile 2012-07-22 19:57:03.161004531 +0200
+@@ -0,0 +1,45 @@
+
+include ${src}/magic.mk
+ifeq (${CONFIG_AUFS_FS},m)
@@ -18831,12 +18880,15 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
+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
diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
--- /usr/share/empty/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/module.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19036,7 +19088,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
+module_exit(aufs_exit);
diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
--- /usr/share/empty/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/module.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19145,7 +19197,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
+#endif /* __AUFS_MODULE_H__ */
diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
--- /usr/share/empty/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/opts.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,1677 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -19363,7 +19415,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
+ else {
+ if (p)
+ *p = '+';
-+ pr_warning("ignored branch attribute %s\n", str);
++ pr_warn("ignored branch attribute %s\n", str);
+ break;
+ }
+ if (p)
@@ -19386,7 +19438,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
+ 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;
+ }
@@ -20272,7 +20324,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
+ 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;
@@ -20608,14 +20660,14 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
+
+ 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;
@@ -20826,7 +20878,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
+}
diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
--- /usr/share/empty/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/opts.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,209 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -21039,8 +21091,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
+#endif /* __AUFS_OPTS_H__ */
diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
--- /usr/share/empty/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/plink.c 2012-05-22 09:06:08.870792417 +0200
-@@ -0,0 +1,515 @@
++++ linux/fs/aufs/plink.c 2012-07-22 19:57:03.164337936 +0200
+@@ -0,0 +1,511 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -21271,9 +21323,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
+ 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));
+
@@ -21282,7 +21332,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
+ 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,
@@ -21359,9 +21409,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
+ 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;
@@ -21369,7 +21417,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
+ 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,
@@ -21467,7 +21515,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
+
+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);
@@ -21558,7 +21606,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
+}
diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
--- /usr/share/empty/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/poll.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -21618,7 +21666,7 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
+}
diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
--- /usr/share/empty/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/procfs.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2010-2012 Junjiro R. Okajima
@@ -21792,7 +21840,7 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
+}
diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
--- /usr/share/empty/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/rdu.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,384 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22180,7 +22228,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
+#endif
diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
--- /usr/share/empty/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/rwsem.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22372,7 +22420,7 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
+#endif /* __AUFS_RWSEM_H__ */
diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
--- /usr/share/empty/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/sbinfo.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,343 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22717,9 +22765,105 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
+ p = radix_tree_delete(&sbinfo->au_si_pid.tree, current->pid);
+ spin_unlock(&sbinfo->au_si_pid.tree_lock);
+}
+diff -urN /usr/share/empty/fs/aufs/security.c linux/fs/aufs/security.c
+--- /usr/share/empty/fs/aufs/security.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/security.c 2012-07-22 19:57:03.164337936 +0200
+@@ -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;
++}
diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
--- /usr/share/empty/fs/aufs/spl.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/spl.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/spl.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -22785,7 +22929,7 @@ diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
+#endif /* __AUFS_SPL_H__ */
diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
--- /usr/share/empty/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/super.c 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,962 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -23751,7 +23895,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
+};
diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
--- /usr/share/empty/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/super.h 2012-07-22 19:57:03.164337936 +0200
@@ -0,0 +1,546 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -24301,7 +24445,7 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
+#endif /* __AUFS_SUPER_H__ */
diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
--- /usr/share/empty/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/sysaufs.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -24410,7 +24554,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
+}
diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
--- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/sysaufs.h 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -24518,7 +24662,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
+#endif /* __SYSAUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
--- /usr/share/empty/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/sysfs.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -24773,13 +24917,13 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
+ "%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);
+ }
+}
diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
--- /usr/share/empty/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysrq.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/sysrq.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -24867,14 +25011,14 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
+ }
+#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;
@@ -24931,7 +25075,7 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
+}
diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
--- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/vdir.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,885 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -25820,7 +25964,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
--- /usr/share/empty/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/vfsub.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,832 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -26656,8 +26800,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
--- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h 2012-05-22 09:06:08.870792417 +0200
-@@ -0,0 +1,232 @@
++++ linux/fs/aufs/vfsub.h 2012-07-22 19:57:03.167671344 +0200
+@@ -0,0 +1,252 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -26691,12 +26835,12 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
+
+/* 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.
@@ -26762,6 +26906,19 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
+
+/* ---------------------------------------------------------------------- */
+
++/* 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);
@@ -26831,6 +26988,13 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
+ 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);
@@ -26892,7 +27056,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
+#endif /* __AUFS_VFSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
--- /usr/share/empty/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/wbr_policy.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,700 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -27596,8 +27760,8 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
+};
diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
--- /usr/share/empty/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.c 2012-05-22 09:06:08.870792417 +0200
-@@ -0,0 +1,1049 @@
++++ linux/fs/aufs/whout.c 2012-07-22 19:57:03.167671344 +0200
+@@ -0,0 +1,1041 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
+ *
@@ -27628,10 +27792,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ * 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.
@@ -27756,7 +27918,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ 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();
@@ -27814,7 +27976,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ * 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);
+}
+
@@ -27874,8 +28036,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ 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)
@@ -28048,18 +28210,12 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ 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] = {
@@ -28179,8 +28335,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ 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);
@@ -28571,8 +28727,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ 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;
+}
+
@@ -28642,14 +28798,14 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
+ 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);
+ }
+}
diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
--- /usr/share/empty/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/whout.h 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -28741,7 +28897,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
+#endif /* __AUFS_WHOUT_H__ */
diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
--- /usr/share/empty/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/wkq.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,214 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -28791,7 +28947,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
+{
+ 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);
@@ -28959,7 +29115,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
+}
diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
--- /usr/share/empty/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h 2012-05-22 09:06:08.870792417 +0200
++++ linux/fs/aufs/wkq.h 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -29055,7 +29211,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
+#endif /* __AUFS_WKQ_H__ */
diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
--- /usr/share/empty/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c 2012-05-22 09:06:08.874125894 +0200
++++ linux/fs/aufs/xino.c 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,1264 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -29375,7 +29531,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
+
+ 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);
@@ -30323,7 +30479,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
+}
diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_type.h
--- /usr/share/empty/include/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/linux/aufs_type.h 2012-05-23 12:07:43.277739181 +0200
++++ linux/include/linux/aufs_type.h 2012-07-22 19:57:03.167671344 +0200
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2005-2012 Junjiro R. Okajima
@@ -30366,7 +30522,7 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
+
+#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')
@@ -30558,4 +30714,3 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
+#define AUFS_CTL_IBUSY _IOWR(AuCtlType, AuCtl_IBUSY, struct aufs_ibusy)
+
+#endif /* __AUFS_TYPE_H__ */
-
diff --git a/kernel-esfq.patch b/kernel-esfq.patch
index 73f1eaa..531b812 100644
--- a/kernel-esfq.patch
+++ b/kernel-esfq.patch
@@ -753,8 +753,8 @@ diff -Naur linux-2.6.24.orig/net/sched/sch_esfq.c linux-2.6.24/net/sched/sch_esf
+ opt.flows = q->depth;
+ opt.hash_kind = q->hash_kind;
+
-+ NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
-+
++ if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt))
++ goto nla_put_failure;
+ return skb->len;
+
+nla_put_failure:
diff --git a/kernel-multiarch.config b/kernel-multiarch.config
index 55a18ff..b9d5956 100644
--- a/kernel-multiarch.config
+++ b/kernel-multiarch.config
@@ -5072,7 +5072,7 @@ COMEDI_NI_TIO all=m
COMEDI_NI_LABPC all=m
COMEDI_AMPLC_DIO200 all=m
COMEDI_AMPLC_PC236 all=m
-COMEDI_AMPLC_PC263 all=m
+COMEDI_AMPLC_PC263_PCI all=m
#-
#- *** FILE: drivers/staging/cptm1217/Kconfig ***
diff --git a/kernel-unionfs.patch b/kernel-unionfs.patch
index 3cdb476..d82d8e0 100644
--- a/kernel-unionfs.patch
+++ b/kernel-unionfs.patch
@@ -4602,10 +4602,10 @@ index 0000000..f583c8f
+ goto out;
+ }
+ saved_vm_ops = vma->vm_ops;
-+ err = do_munmap(current->mm, vma->vm_start,
++ err = vm_munmap(vma->vm_start,
+ vma->vm_end - vma->vm_start);
+ if (err) {
-+ printk(KERN_ERR "unionfs: do_munmap failed %d\n", err);
++ printk(KERN_ERR "unionfs: vm_munmap failed %d\n", err);
+ goto out;
+ }
+ }
@@ -9317,7 +9317,7 @@ index 0000000..b99f14d
+ struct unionfs_dir_state *rdstate;
+
+ truncate_inode_pages(&inode->i_data, 0);
-+ end_writeback(inode);
++ clear_inode(inode);
+
+ list_for_each_safe(pos, n, &UNIONFS_I(inode)->readdircache) {
+ rdstate = list_entry(pos, struct unionfs_dir_state, cache);
More information about the pld-cvs-commit
mailing list