]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-aufs3.patch
- rel 3
[packages/kernel.git] / kernel-aufs3.patch
index e541aaf60abb497c3efe6f7cf3133869542e779e..b84ccd4f4568423aeab8f586d5c5f64b9144a984 100644 (file)
@@ -1,10 +1,10 @@
-aufs3.x-rcN kbuild patch
+aufs3.4 kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
-index 5f4c45d..357a8a6 100644
+index f95ae3a..6d8a9a5 100644
 --- a/fs/Kconfig
 +++ b/fs/Kconfig
-@@ -215,6 +215,7 @@ source "fs/pstore/Kconfig"
+@@ -220,6 +220,7 @@ source "fs/pstore/Kconfig"
  source "fs/sysv/Kconfig"
  source "fs/ufs/Kconfig"
  source "fs/exofs/Kconfig"
@@ -13,19 +13,19 @@ index 5f4c45d..357a8a6 100644
  endif # MISC_FILESYSTEMS
  
 diff --git a/fs/Makefile b/fs/Makefile
-index d2c3353..680ad8a 100644
+index 2fb9779..abefac5 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
-@@ -123,3 +123,4 @@ obj-$(CONFIG_GFS2_FS)           += gfs2/
+@@ -125,3 +125,4 @@ obj-$(CONFIG_GFS2_FS)           += gfs2/
  obj-y                         += exofs/ # Multiple modules
  obj-$(CONFIG_CEPH_FS)         += ceph/
  obj-$(CONFIG_PSTORE)          += pstore/
 +obj-$(CONFIG_AUFS_FS)           += aufs/
 diff --git a/include/linux/Kbuild b/include/linux/Kbuild
-index 619b565..29f386b 100644
+index 3c9b616..8704efa 100644
 --- a/include/linux/Kbuild
 +++ b/include/linux/Kbuild
-@@ -65,6 +65,7 @@ header-y += atmppp.h
+@@ -66,6 +66,7 @@ header-y += atmppp.h
  header-y += atmsap.h
  header-y += atmsvc.h
  header-y += audit.h
@@ -33,13 +33,13 @@ index 619b565..29f386b 100644
  header-y += auto_fs.h
  header-y += auto_fs4.h
  header-y += auxvec.h
-aufs3.x-rcN base patch
+aufs3.4 base patch
 
 diff --git a/fs/namei.c b/fs/namei.c
-index 5008f01..4cc94cf 100644
+index c427919..7ff959b 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -1753,7 +1753,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
+@@ -1831,7 +1831,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
   * needs parent already locked. Doesn't follow mounts.
   * SMP-safe.
   */
@@ -49,10 +49,10 @@ index 5008f01..4cc94cf 100644
        return __lookup_hash(&nd->last, nd->path.dentry, nd);
  }
 diff --git a/fs/splice.c b/fs/splice.c
-index fa2defa..e3569b0 100644
+index f847684..f871233 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1085,8 +1085,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1084,8 +1084,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
  /*
   * Attempt to initiate a splice from pipe to file.
   */
@@ -63,7 +63,7 @@ index fa2defa..e3569b0 100644
  {
        ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
                                loff_t *, size_t, unsigned int);
-@@ -1113,9 +1113,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1112,9 +1112,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.
   */
@@ -103,13 +103,13 @@ index 26e5b61..3ffef2f 100644
 +                       struct pipe_inode_info *pipe, size_t len,
 +                       unsigned int flags);
  #endif
-aufs3.x-rcN standalone patch
+aufs3.4 standalone patch
 
 diff --git a/fs/file_table.c b/fs/file_table.c
-index c322794..2aad244 100644
+index 70f2a0f..146a3d7 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
-@@ -443,6 +443,8 @@ void file_sb_list_del(struct file *file)
+@@ -442,6 +442,8 @@ void file_sb_list_del(struct file *file)
        }
  }
  
@@ -119,10 +119,10 @@ index c322794..2aad244 100644
  
  /*
 diff --git a/fs/inode.c b/fs/inode.c
-index ee4e66b..728042b 100644
+index 9f4f5fe..bb0f3ba 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
-@@ -65,6 +65,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
+@@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
  static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
  
  __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
@@ -131,10 +131,10 @@ index ee4e66b..728042b 100644
  /*
   * Empty aops. Can be used for the cases where the user does not
 diff --git a/fs/namei.c b/fs/namei.c
-index 4cc94cf..af19e30 100644
+index 7ff959b..b170167 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -1757,6 +1757,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
+@@ -1835,6 +1835,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
  {
        return __lookup_hash(&nd->last, nd->path.dentry, nd);
  }
@@ -143,16 +143,16 @@ index 4cc94cf..af19e30 100644
  /**
   * lookup_one_len - filesystem helper to lookup single pathname component
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 6d3a196..d832654 100644
+index e608199..38fcc2e 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -1509,6 +1509,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1339,6 +1339,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
        }
        return 0;
  }
 +EXPORT_SYMBOL(iterate_mounts);
  
- static void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end)
+ static void cleanup_group_ids(struct mount *mnt, struct mount *end)
  {
 diff --git a/fs/notify/group.c b/fs/notify/group.c
 index 63fc294..6f4adca 100644
@@ -180,7 +180,7 @@ index 63fc294..6f4adca 100644
  }
 +EXPORT_SYMBOL(fsnotify_alloc_group);
 diff --git a/fs/notify/mark.c b/fs/notify/mark.c
-index e14587d..be6533b 100644
+index f104d56..54f36db 100644
 --- a/fs/notify/mark.c
 +++ b/fs/notify/mark.c
 @@ -112,6 +112,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
@@ -191,7 +191,7 @@ index e14587d..be6533b 100644
  
  /*
   * Any time a mark is getting freed we end up here.
-@@ -189,6 +190,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
+@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
        if (unlikely(atomic_dec_and_test(&group->num_marks)))
                fsnotify_final_destroy_group(group);
  }
@@ -199,7 +199,7 @@ index e14587d..be6533b 100644
  
  void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
  {
-@@ -276,6 +278,7 @@ err:
+@@ -278,6 +280,7 @@ err:
  
        return ret;
  }
@@ -207,7 +207,7 @@ index e14587d..be6533b 100644
  
  /*
   * clear any marks in a group in which mark->flags & flags is true
-@@ -331,6 +334,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
+@@ -333,6 +336,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
        atomic_set(&mark->refcnt, 1);
        mark->free_mark = free_mark;
  }
@@ -216,7 +216,7 @@ index e14587d..be6533b 100644
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index 22c41b5..33b4033 100644
+index 5720854..ec59242 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 +228,10 @@ index 22c41b5..33b4033 100644
  static long do_sys_truncate(const char __user *pathname, loff_t length)
  {
 diff --git a/fs/splice.c b/fs/splice.c
-index e3569b0..9dc07b7 100644
+index f871233..70f5481 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1109,6 +1109,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1108,6 +1108,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  
        return splice_write(pipe, out, ppos, len, flags);
  }
@@ -239,7 +239,7 @@ index e3569b0..9dc07b7 100644
  
  /*
   * Attempt to initiate a splice from a file to a pipe.
-@@ -1135,6 +1136,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1134,6 +1135,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  
        return splice_read(in, ppos, pipe, len, flags);
  }
@@ -248,19 +248,27 @@ index e3569b0..9dc07b7 100644
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/security/commoncap.c b/security/commoncap.c
-index ee4f848..611fd70 100644
+index 71a166a..5d63aac 100644
 --- a/security/commoncap.c
 +++ b/security/commoncap.c
-@@ -975,3 +975,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot,
+@@ -972,3 +972,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot,
        }
        return ret;
  }
 +EXPORT_SYMBOL(cap_file_mmap);
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index 4450fbe..2c437e5 100644
+index c43a332..0c37289 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
-@@ -500,6 +500,7 @@ found:
+@@ -7,6 +7,7 @@
+ #include <linux/device_cgroup.h>
+ #include <linux/cgroup.h>
+ #include <linux/ctype.h>
++#include <linux/export.h>
+ #include <linux/list.h>
+ #include <linux/uaccess.h>
+ #include <linux/seq_file.h>
+@@ -499,6 +500,7 @@ found:
  
        return -EPERM;
  }
@@ -269,10 +277,10 @@ index 4450fbe..2c437e5 100644
  int devcgroup_inode_mknod(int mode, dev_t dev)
  {
 diff --git a/security/security.c b/security/security.c
-index 0c6cc69..d58ba1b 100644
+index bf619ff..60b996a 100644
 --- a/security/security.c
 +++ b/security/security.c
-@@ -411,6 +411,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
+@@ -380,6 +380,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
                return 0;
        return security_ops->path_rmdir(dir, dentry);
  }
@@ -280,7 +288,7 @@ index 0c6cc69..d58ba1b 100644
  
  int security_path_unlink(struct path *dir, struct dentry *dentry)
  {
-@@ -427,6 +428,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
+@@ -396,6 +397,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
                return 0;
        return security_ops->path_symlink(dir, dentry, old_name);
  }
@@ -288,7 +296,7 @@ index 0c6cc69..d58ba1b 100644
  
  int security_path_link(struct dentry *old_dentry, struct path *new_dir,
                       struct dentry *new_dentry)
-@@ -435,6 +437,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
+@@ -404,6 +406,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);
  }
@@ -296,23 +304,23 @@ index 0c6cc69..d58ba1b 100644
  
  int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
                         struct path *new_dir, struct dentry *new_dentry)
-@@ -453,6 +456,7 @@ int security_path_truncate(struct path *path)
+@@ -422,6 +425,7 @@ int security_path_truncate(struct path *path)
                return 0;
        return security_ops->path_truncate(path);
  }
 +EXPORT_SYMBOL(security_path_truncate);
  
- int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
-                       mode_t mode)
-@@ -461,6 +465,7 @@ int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
+ int security_path_chmod(struct path *path, umode_t mode)
+ {
+@@ -429,6 +433,7 @@ int security_path_chmod(struct path *path, umode_t mode)
                return 0;
-       return security_ops->path_chmod(dentry, mnt, mode);
+       return security_ops->path_chmod(path, mode);
  }
 +EXPORT_SYMBOL(security_path_chmod);
  
  int security_path_chown(struct path *path, uid_t uid, gid_t gid)
  {
-@@ -468,6 +473,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)
                return 0;
        return security_ops->path_chown(path, uid, gid);
  }
@@ -320,7 +328,7 @@ index 0c6cc69..d58ba1b 100644
  
  int security_path_chroot(struct path *path)
  {
-@@ -544,6 +550,7 @@ int security_inode_readlink(struct dentry *dentry)
+@@ -512,6 +518,7 @@ int security_inode_readlink(struct dentry *dentry)
                return 0;
        return security_ops->inode_readlink(dentry);
  }
@@ -328,7 +336,7 @@ index 0c6cc69..d58ba1b 100644
  
  int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
  {
-@@ -558,6 +565,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -526,6 +533,7 @@ int security_inode_permission(struct inode *inode, int mask)
                return 0;
        return security_ops->inode_permission(inode, mask);
  }
@@ -336,7 +344,7 @@ index 0c6cc69..d58ba1b 100644
  
  int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  {
-@@ -673,6 +681,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -641,6 +649,7 @@ int security_file_permission(struct file *file, int mask)
  
        return fsnotify_perm(file, mask);
  }
@@ -344,7 +352,7 @@ index 0c6cc69..d58ba1b 100644
  
  int security_file_alloc(struct file *file)
  {
-@@ -700,6 +709,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot,
+@@ -668,6 +677,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot,
                return ret;
        return ima_file_mmap(file, prot);
  }
@@ -354,7 +362,7 @@ index 0c6cc69..d58ba1b 100644
                            unsigned long prot)
 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       2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/ABI/testing/debugfs-aufs       2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,37 @@
 +What:         /debug/aufs/si_<id>/
 +Date:         March 2009
@@ -395,7 +403,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 2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/ABI/testing/sysfs-aufs 2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,24 @@
 +What:         /sys/fs/aufs/si_<id>/
 +Date:         March 2009
@@ -423,7 +431,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    2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/01intro.txt    2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,162 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -589,7 +597,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   2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/02struct.txt   2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,226 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -819,7 +827,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   2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt   2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,106 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -929,7 +937,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   2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/04branch.txt   2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,76 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1009,7 +1017,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       2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt       2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,65 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1078,7 +1086,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     2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt     2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,47 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1129,7 +1137,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   2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/07export.txt   2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,59 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1192,7 +1200,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     2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt     2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,53 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1249,7 +1257,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    2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt    2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,47 @@
 +
 +# Copyright (C) 2010-2011 Junjiro R. Okajima
@@ -1300,7 +1308,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     2011-08-24 13:30:24.727980364 +0200
++++ linux/Documentation/filesystems/aufs/design/99plan.txt     2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,96 @@
 +
 +# Copyright (C) 2005-2011 Junjiro R. Okajima
@@ -1400,8 +1408,8 @@ 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-01-05 11:00:59.215501779 +0100
-@@ -0,0 +1,328 @@
++++ linux/Documentation/filesystems/aufs/README        2012-05-22 09:06:08.864125478 +0200
+@@ -0,0 +1,330 @@
 +
 +Aufs3 -- advanced multi layered unification filesystem version 3.x
 +http://aufs.sf.net
@@ -1551,7 +1559,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +
 +For (an unreleased) example:
 +If you are using "linux-3.10" and the "aufs3.10" branch
-+does not exit in aufs-util repository, then "aufs3.9", "aufs3.8"
++does not exist in aufs-util repository, then "aufs3.9", "aufs3.8"
 +or something numerically smaller is the branch for your kernel.
 +
 +Also you can view all branches by
@@ -1583,7 +1591,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +  =m or =y.
 +- and build your kernel as usual.
 +- install the built kernel.
-+- install the header files too by "make headers_install".
++- install the header files too by "make headers_install" to the
++  directory where you specify. By default, it is $PWD/usr.
 +- and reboot your system.
 +
 +2.
@@ -1605,7 +1614,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +    ./aufs.ko to /lib/modules/... and run depmod -a (or reboot simply).
 +  + run "make headers_install" to install the aufs header file (you can
 +    specify DESTDIR), or copty ./usr/include/linux/aufs_type.h to
-+    /usr/include/linux or wherever you like.
++    /usr/include/linux or wherever you like. By default, the target
++    directory is $PWD/usr.
 +- no need to apply aufs3-kbuild.patch, nor copying source files to your
 +  kernel source tree.
 +
@@ -1711,7 +1721,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +Pavel Pronskiy made a donation (2011/2).
 +Iridium and Inmarsat satellite phone retailer (www.mailasail.com), Nippy
 +      Networks (Ed Wildgoose) made a donation for hardware (2011/3).
-+Max Lekomcev (DOM-TV project) made a donation (2011/7).
++Max Lekomcev (DOM-TV project) made a donation (2011/7, 12 and 2012/3).
 +Sam Liddicott made a donation (2011/9).
 +
 +Thank you very much.
@@ -1732,10 +1742,10 @@ 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       2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/aufs.h       2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,60 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -1796,10 +1806,10 @@ 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     2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,1170 @@
++++ linux/fs/aufs/branch.c     2012-05-22 09:06:08.864125478 +0200
+@@ -0,0 +1,1169 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -1821,7 +1831,6 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 + */
 +
 +#include <linux/compat.h>
-+#include <linux/file.h>
 +#include <linux/statfs.h>
 +#include "aufs.h"
 +
@@ -2970,10 +2979,10 @@ 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     2011-10-24 20:51:51.580466925 +0200
-@@ -0,0 +1,232 @@
++++ linux/fs/aufs/branch.h     2012-05-22 09:06:08.864125478 +0200
+@@ -0,0 +1,230 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -2999,9 +3008,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/fs.h>
 +#include <linux/mount.h>
-+#include <linux/aufs_type.h>
 +#include "dynop.h"
 +#include "rwsem.h"
 +#include "super.h"
@@ -3206,7 +3213,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      2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/conf.mk      2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,38 @@
 +
 +AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
@@ -3248,10 +3255,10 @@ 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-01-05 11:00:59.215501779 +0100
-@@ -0,0 +1,1081 @@
++++ linux/fs/aufs/cpup.c       2012-05-22 09:06:08.864125478 +0200
+@@ -0,0 +1,1084 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -3272,10 +3279,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 + * copy-up functions, see wbr_policy.c for copy-down
 + */
 +
-+#include <linux/file.h>
 +#include <linux/fs_stack.h>
 +#include <linux/mm.h>
-+#include <linux/uaccess.h>
 +#include "aufs.h"
 +
 +void au_cpup_attr_flags(struct inode *dst, struct inode *src)
@@ -3312,6 +3317,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +          && au_plink_test(inode))
 +              return;
 +
++      /*
++       * 0 can happen in revalidating.
++       * h_inode->i_mutex is not held, but it is harmless since once i_nlink
++       * reaches 0, it will never become positive.
++       */
 +      set_nlink(inode, h_inode->i_nlink);
 +
 +      /*
@@ -4333,10 +4343,10 @@ 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       2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,83 @@
++++ linux/fs/aufs/cpup.h       2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,81 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -4363,8 +4373,6 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 +#ifdef __KERNEL__
 +
 +#include <linux/path.h>
-+#include <linux/time.h>
-+#include <linux/aufs_type.h>
 +
 +struct inode;
 +struct file;
@@ -4420,10 +4428,10 @@ 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-01-05 11:00:59.215501779 +0100
++++ linux/fs/aufs/dbgaufs.c    2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,334 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -4758,10 +4766,10 @@ 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    2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,52 @@
++++ linux/fs/aufs/dbgaufs.h    2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,49 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -4787,9 +4795,6 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/init.h>
-+#include <linux/aufs_type.h>
-+
 +struct super_block;
 +struct au_sbinfo;
 +
@@ -4814,10 +4819,10 @@ 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      2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/dcsub.c      2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,243 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -5061,10 +5066,10 @@ 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      2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,95 @@
++++ linux/fs/aufs/dcsub.h      2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,94 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -5092,7 +5097,6 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +
 +#include <linux/dcache.h>
 +#include <linux/fs.h>
-+#include <linux/types.h>
 +
 +struct dentry;
 +
@@ -5160,10 +5164,10 @@ 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      2011-10-24 20:51:51.580466925 +0200
-@@ -0,0 +1,490 @@
++++ linux/fs/aufs/debug.c      2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,489 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -5184,7 +5188,6 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 + * debug print functions
 + */
 +
-+#include <linux/module.h>
 +#include <linux/vt_kern.h>
 +#include "aufs.h"
 +
@@ -5654,10 +5657,10 @@ 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      2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,252 @@
++++ linux/fs/aufs/debug.h      2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,242 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -5683,19 +5686,9 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +
 +#ifdef __KERNEL__
 +
-+#include <asm/system.h>
-+#include <linux/bug.h>
-+/* #include <linux/err.h> */
-+#include <linux/init.h>
 +#include <linux/module.h>
 +#include <linux/kallsyms.h>
-+/* #include <linux/kernel.h> */
-+#include <linux/delay.h>
-+/* #include <linux/kd.h> */
 +#include <linux/sysrq.h>
-+#include <linux/aufs_type.h>
-+
-+#include <asm/system.h>
 +
 +#ifdef CONFIG_AUFS_DEBUG
 +#define AuDebugOn(a)          BUG_ON(a)
@@ -5910,10 +5903,10 @@ 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     2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/dentry.c     2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,1140 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -7054,10 +7047,10 @@ 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     2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,238 @@
++++ linux/fs/aufs/dentry.h     2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,237 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -7084,7 +7077,6 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#ifdef __KERNEL__
 +
 +#include <linux/dcache.h>
-+#include <linux/aufs_type.h>
 +#include "rwsem.h"
 +
 +struct au_hdentry {
@@ -7296,10 +7288,10 @@ 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      2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/dinfo.c      2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,543 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -7843,10 +7835,10 @@ 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-01-05 11:00:59.215501779 +0100
-@@ -0,0 +1,635 @@
++++ linux/fs/aufs/dir.c        2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,636 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -7867,7 +7859,6 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 + * directory operations
 + */
 +
-+#include <linux/file.h>
 +#include <linux/fs_stack.h>
 +#include "aufs.h"
 +
@@ -7881,6 +7872,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +      nlink += h_dir->i_nlink - 2;
 +      if (h_dir->i_nlink < 2)
 +              nlink += 2;
++      /* 0 can happen in revaliding */
 +      set_nlink(dir, nlink);
 +}
 +
@@ -7894,6 +7886,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +      nlink -= h_dir->i_nlink - 2;
 +      if (h_dir->i_nlink < 2)
 +              nlink -= 2;
++      /* nlink == 0 means the branch-fs is broken */
 +      set_nlink(dir, nlink);
 +}
 +
@@ -8482,10 +8475,10 @@ 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        2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,138 @@
++++ linux/fs/aufs/dir.h        2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,137 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -8512,7 +8505,6 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#ifdef __KERNEL__
 +
 +#include <linux/fs.h>
-+#include <linux/aufs_type.h>
 +
 +/* ---------------------------------------------------------------------- */
 +
@@ -8624,10 +8616,10 @@ 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      2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/dynop.c      2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,377 @@
 +/*
-+ * Copyright (C) 2010-2011 Junjiro R. Okajima
++ * Copyright (C) 2010-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
@@ -9005,10 +8997,10 @@ 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      2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,80 @@
++++ linux/fs/aufs/dynop.h      2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,76 @@
 +/*
-+ * Copyright (C) 2010-2011 Junjiro R. Okajima
++ * Copyright (C) 2010-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
@@ -9034,10 +9026,6 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/fs.h>
-+#include <linux/mm.h>
-+#include <linux/rcupdate.h>
-+#include <linux/aufs_type.h>
 +#include "inode.h"
 +
 +enum {AuDy_AOP, AuDyLast};
@@ -9089,10 +9077,10 @@ 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     2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,805 @@
++++ linux/fs/aufs/export.c     2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,803 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -9114,12 +9102,12 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 + */
 +
 +#include <linux/exportfs.h>
-+#include <linux/file.h>
-+#include <linux/mnt_namespace.h>
++#include <linux/fs_struct.h>
 +#include <linux/namei.h>
 +#include <linux/nsproxy.h>
 +#include <linux/random.h>
 +#include <linux/writeback.h>
++#include "../fs/mount.h"
 +#include "aufs.h"
 +
 +union conv {
@@ -9373,18 +9361,16 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +static struct vfsmount *au_mnt_get(struct super_block *sb)
 +{
 +      int err;
++      struct path root;
 +      struct au_compare_mnt_args args = {
 +              .sb = sb
 +      };
-+      struct mnt_namespace *ns;
 +
++      get_fs_root(current->fs, &root);
 +      br_read_lock(vfsmount_lock);
-+      /* no get/put ?? */
-+      AuDebugOn(!current->nsproxy);
-+      ns = current->nsproxy->mnt_ns;
-+      AuDebugOn(!ns);
-+      err = iterate_mounts(au_compare_mnt, &args, ns->root);
++      err = iterate_mounts(au_compare_mnt, &args, root.mnt);
 +      br_read_unlock(vfsmount_lock);
++      path_put(&root);
 +      AuDebugOn(!err);
 +      AuDebugOn(!args.mnt);
 +      return args.mnt;
@@ -9898,10 +9884,10 @@ 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       2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/file.c       2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,676 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -9922,9 +9908,9 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 + * handling file/dir, and address_space operation
 + */
 +
-+#include <linux/file.h>
-+#include <linux/fsnotify.h>
-+#include <linux/namei.h>
++#ifdef CONFIG_AUFS_DEBUG
++#include <linux/migrate.h>
++#endif
 +#include <linux/pagemap.h>
 +#include "aufs.h"
 +
@@ -10543,7 +10529,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +static int aufs_releasepage(struct page *page, gfp_t gfp)
 +{ AuUnsupport(); return 0; }
 +static int aufs_migratepage(struct address_space *mapping, struct page *newpage,
-+                          struct page *page)
++                          struct page *page, enum migrate_mode mode)
 +{ AuUnsupport(); return 0; }
 +static int aufs_launder_page(struct page *page)
 +{ AuUnsupport(); return 0; }
@@ -10578,10 +10564,10 @@ 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       2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,299 @@
++++ linux/fs/aufs/file.h       2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,298 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -10610,7 +10596,6 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +#include <linux/file.h>
 +#include <linux/fs.h>
 +#include <linux/poll.h>
-+#include <linux/aufs_type.h>
 +#include "rwsem.h"
 +
 +struct au_branch;
@@ -10881,10 +10866,10 @@ 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-01-05 11:00:59.215501779 +0100
-@@ -0,0 +1,157 @@
++++ linux/fs/aufs/finfo.c      2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,156 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -10905,7 +10890,6 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 + * file private data
 + */
 +
-+#include <linux/file.h>
 +#include "aufs.h"
 +
 +void au_hfput(struct au_hfile *hf, struct file *file)
@@ -11042,10 +11026,10 @@ 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-01-05 11:00:59.215501779 +0100
-@@ -0,0 +1,731 @@
++++ linux/fs/aufs/f_op.c       2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,729 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -11066,10 +11050,8 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 + * file and vm operations
 + */
 +
-+#include <linux/file.h>
 +#include <linux/fs_stack.h>
 +#include <linux/mman.h>
-+#include <linux/mm.h>
 +#include <linux/security.h>
 +#include "aufs.h"
 +
@@ -11777,10 +11759,10 @@ 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    2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,299 @@
++++ linux/fs/aufs/f_op_sp.c    2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,298 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -11803,7 +11785,6 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 + * their file I/O is handled out of aufs.
 + */
 +
-+#include <linux/fs_stack.h>
 +#include "aufs.h"
 +
 +static ssize_t aufs_aio_read_sp(struct kiocb *kio, const struct iovec *iov,
@@ -12080,10 +12061,10 @@ 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     2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,497 @@
++++ linux/fs/aufs/fstype.h     2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,496 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -12112,7 +12093,6 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#include <linux/fs.h>
 +#include <linux/magic.h>
 +#include <linux/romfs_fs.h>
-+#include <linux/aufs_type.h>
 +
 +static inline int au_test_aufs(struct super_block *sb)
 +{
@@ -12581,10 +12561,10 @@ 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  2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,247 @@
++++ linux/fs/aufs/hfsnotify.c  2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,260 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -12611,15 +12591,17 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +static const __u32 AuHfsnMask = (FS_MOVED_TO | FS_MOVED_FROM | FS_DELETE
 +                               | FS_CREATE | FS_EVENT_ON_CHILD);
 +static DECLARE_WAIT_QUEUE_HEAD(au_hfsn_wq);
++static __cacheline_aligned_in_smp atomic64_t au_hfsn_ifree = ATOMIC64_INIT(0);
 +
 +static void au_hfsn_free_mark(struct fsnotify_mark *mark)
 +{
 +      struct au_hnotify *hn = container_of(mark, struct au_hnotify,
 +                                           hn_mark);
 +      AuDbg("here\n");
-+      hn->hn_mark_dead = 1;
-+      smp_mb();
-+      wake_up_all(&au_hfsn_wq);
++      au_cache_free_hnotify(hn);
++      smp_mb__before_atomic_dec();
++      atomic64_dec(&au_hfsn_ifree);
++      wake_up(&au_hfsn_wq);
 +}
 +
 +static int au_hfsn_alloc(struct au_hinode *hinode)
@@ -12634,7 +12616,6 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      sb = hn->hn_aufs_inode->i_sb;
 +      bindex = au_br_index(sb, hinode->hi_id);
 +      br = au_sbr(sb, bindex);
-+      hn->hn_mark_dead = 0;
 +      mark = &hn->hn_mark;
 +      fsnotify_init_mark(mark, au_hfsn_free_mark);
 +      mark->mask = AuHfsnMask;
@@ -12646,18 +12627,20 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +                               /*mnt*/NULL, /*allow_dups*/1);
 +}
 +
-+static void au_hfsn_free(struct au_hinode *hinode)
++static int au_hfsn_free(struct au_hinode *hinode, struct au_hnotify *hn)
 +{
-+      struct au_hnotify *hn;
 +      struct fsnotify_mark *mark;
++      unsigned long long ull;
++
++      ull = atomic64_inc_return(&au_hfsn_ifree);
++      BUG_ON(!ull);
 +
-+      hn = hinode->hi_notify;
 +      mark = &hn->hn_mark;
 +      fsnotify_destroy_mark(mark);
 +      fsnotify_put_mark(mark);
 +
-+      /* TODO: bad approach */
-+      wait_event(au_hfsn_wq, hn->hn_mark_dead);
++      /* free hn by myself */
++      return 0;
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -12821,21 +12804,31 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      return err;
 +}
 +
++/* ---------------------------------------------------------------------- */
++
++static void au_hfsn_fin(void)
++{
++      AuDbg("au_hfsn_ifree %lld\n", (long long)atomic64_read(&au_hfsn_ifree));
++      wait_event(au_hfsn_wq, !atomic64_read(&au_hfsn_ifree));
++}
++
 +const struct au_hnotify_op au_hnotify_op = {
 +      .ctl            = au_hfsn_ctl,
 +      .alloc          = au_hfsn_alloc,
 +      .free           = au_hfsn_free,
 +
++      .fin            = au_hfsn_fin,
++
 +      .reset_br       = au_hfsn_reset_br,
 +      .fin_br         = au_hfsn_fin_br,
 +      .init_br        = au_hfsn_init_br
 +};
 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    2011-08-24 13:30:24.731313534 +0200
-@@ -0,0 +1,58 @@
++++ linux/fs/aufs/hfsplus.c    2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,57 @@
 +/*
-+ * Copyright (C) 2010-2011 Junjiro R. Okajima
++ * Copyright (C) 2010-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
@@ -12862,7 +12855,6 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 + * and au_h_open_post() after releasing it.
 + */
 +
-+#include <linux/file.h>
 +#include "aufs.h"
 +
 +struct file *au_h_open_pre(struct dentry *dentry, aufs_bindex_t bindex)
@@ -12894,10 +12886,10 @@ 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    2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/hnotify.c    2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,712 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -12956,9 +12948,9 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +
 +      hn = hinode->hi_notify;
 +      if (hn) {
-+              au_hnotify_op.free(hinode);
-+              au_cache_free_hnotify(hn);
 +              hinode->hi_notify = NULL;
++              if (au_hnotify_op.free(hinode, hn))
++                      au_cache_free_hnotify(hn);
 +      }
 +}
 +
@@ -13610,10 +13602,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/iinfo.c      2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,264 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -13878,10 +13870,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/inode.c      2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,471 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -14353,10 +14345,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,556 @@
++++ linux/fs/aufs/inode.h      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,560 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -14382,9 +14374,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/fs.h>
 +#include <linux/fsnotify.h>
-+#include <linux/aufs_type.h>
 +#include "rwsem.h"
 +
 +struct vfsmount;
@@ -14394,7 +14384,6 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#ifdef CONFIG_AUFS_HFSNOTIFY
 +      /* never use fsnotify_add_vfsmount_mark() */
 +      struct fsnotify_mark            hn_mark;
-+      int                             hn_mark_dead;
 +#endif
 +      struct inode                    *hn_aufs_inode; /* no get/put */
 +#endif
@@ -14517,13 +14506,14 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +/* i_op_add.c */
 +int au_may_add(struct dentry *dentry, aufs_bindex_t bindex,
 +             struct dentry *h_parent, int isdir);
-+int aufs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev);
++int aufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
++             dev_t dev);
 +int aufs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
-+int aufs_create(struct inode *dir, struct dentry *dentry, int mode,
++int aufs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 +              struct nameidata *nd);
 +int aufs_link(struct dentry *src_dentry, struct inode *dir,
 +            struct dentry *dentry);
-+int aufs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
++int aufs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
 +
 +/* i_op_del.c */
 +int au_wr_dir_need_wh(struct dentry *dentry, int isdir, aufs_bindex_t *bcpup);
@@ -14814,7 +14804,13 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +struct au_hnotify_op {
 +      void (*ctl)(struct au_hinode *hinode, int do_set);
 +      int (*alloc)(struct au_hinode *hinode);
-+      void (*free)(struct au_hinode *hinode);
++
++      /*
++       * if it returns true, the the caller should free hinode->hi_notify,
++       * otherwise ->free() frees it.
++       */
++      int (*free)(struct au_hinode *hinode,
++                  struct au_hnotify *hn) __must_check;
 +
 +      void (*fin)(void);
 +      int (*init)(void);
@@ -14913,10 +14909,10 @@ 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      2011-10-24 20:51:51.580466925 +0200
-@@ -0,0 +1,197 @@
++++ linux/fs/aufs/ioctl.c      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,196 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -14939,7 +14935,6 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 + * assist the pathconf(3) wrapper library.
 + */
 +
-+#include <linux/file.h>
 +#include "aufs.h"
 +
 +static int au_wbr_fd(struct path *path, struct aufs_wbr_fd __user *arg)
@@ -15114,10 +15109,10 @@ 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   2011-10-24 20:51:51.580466925 +0200
-@@ -0,0 +1,711 @@
++++ linux/fs/aufs/i_op_add.c   2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,712 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -15333,14 +15328,14 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      int type;
 +      union {
 +              struct {
-+                      int mode;
++                      umode_t mode;
 +                      struct nameidata *nd;
 +              } c;
 +              struct {
 +                      const char *symname;
 +              } s;
 +              struct {
-+                      int mode;
++                      umode_t mode;
 +                      dev_t dev;
 +              } m;
 +      } u;
@@ -15427,7 +15422,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      return err;
 +}
 +
-+int aufs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
++int aufs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
++             dev_t dev)
 +{
 +      struct simple_arg arg = {
 +              .type = Mknod,
@@ -15448,7 +15444,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      return add_simple(dir, dentry, &arg);
 +}
 +
-+int aufs_create(struct inode *dir, struct dentry *dentry, int mode,
++int aufs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 +              struct nameidata *nd)
 +{
 +      struct simple_arg arg = {
@@ -15720,7 +15716,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      return err;
 +}
 +
-+int aufs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
++int aufs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 +{
 +      int err, rerr;
 +      aufs_bindex_t bindex;
@@ -15829,10 +15825,10 @@ 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-01-05 11:00:59.215501779 +0100
-@@ -0,0 +1,994 @@
++++ linux/fs/aufs/i_op.c       2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,993 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -15858,7 +15854,6 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +#include <linux/mm.h>
 +#include <linux/namei.h>
 +#include <linux/security.h>
-+#include <linux/uaccess.h>
 +#include "aufs.h"
 +
 +static int h_permission(struct inode *h_inode, int mask,
@@ -16532,8 +16527,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +      a->h_path.mnt = au_sbr_mnt(sb, a->btgt);
 +      if ((ia->ia_valid & (ATTR_MODE | ATTR_CTIME))
 +          == (ATTR_MODE | ATTR_CTIME)) {
-+              err = security_path_chmod(a->h_path.dentry, a->h_path.mnt,
-+                                        ia->ia_mode);
++              err = security_path_chmod(&a->h_path, ia->ia_mode);
 +              if (unlikely(err))
 +                      goto out_unlock;
 +      } else if ((ia->ia_valid & (ATTR_UID | ATTR_GID))
@@ -16599,6 +16593,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +              n = inode->i_nlink;
 +              n -= nlink;
 +              n += st->nlink;
++              /* 0 can happen */
 +              set_nlink(inode, n);
 +      }
 +
@@ -16827,10 +16822,10 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +};
 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   2011-08-24 13:30:24.731313534 +0200
++++ linux/fs/aufs/i_op_del.c   2012-05-22 09:06:08.867458905 +0200
 @@ -0,0 +1,478 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -17309,10 +17304,10 @@ 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   2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,1017 @@
++++ linux/fs/aufs/i_op_ren.c   2012-05-22 09:06:08.867458905 +0200
+@@ -0,0 +1,1026 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -18220,6 +18215,15 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +      } else if (unlikely(d_unhashed(a->dst_dentry)))
 +              goto out_unlock;
 +
++      /*
++       * is it possible?
++       * yes, it happend (in linux-3.3-rcN) but I don't know why.
++       * there may exist a problem somewhere else.
++       */
++      err = -EINVAL;
++      if (unlikely(a->dst_parent->d_inode == a->src_dentry->d_inode))
++              goto out_unlock;
++
 +      au_fset_ren(a->flags, ISSAMEDIR); /* temporary */
 +      di_write_lock_parent(a->dst_parent);
 +
@@ -18330,7 +18334,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      2011-08-24 13:30:24.727980364 +0200
++++ linux/fs/aufs/Kconfig      2012-05-22 09:06:08.864125478 +0200
 @@ -0,0 +1,203 @@
 +config AUFS_FS
 +      tristate "Aufs (Advanced multi layered unification filesystem) support"
@@ -18537,10 +18541,10 @@ 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       2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/loop.c       2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,133 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -18674,10 +18678,10 @@ 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       2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/loop.h       2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,50 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -18728,7 +18732,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     2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/magic.mk     2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,54 @@
 +
 +# defined in ${srctree}/fs/fuse/inode.c
@@ -18786,8 +18790,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     2011-08-24 13:30:24.727980364 +0200
-@@ -0,0 +1,38 @@
++++ linux/fs/aufs/Makefile     2012-05-22 09:06:08.864125478 +0200
+@@ -0,0 +1,42 @@
 +
 +include ${src}/magic.mk
 +ifeq (${CONFIG_AUFS_FS},m)
@@ -18798,8 +18802,12 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +# cf. include/linux/kernel.h
 +# enable pr_debug
 +ccflags-y += -DDEBUG
-+# sparse doesn't allow spaces
-+ccflags-y += -D'pr_fmt(fmt)=AUFS_NAME"\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'
++# sparse requires the full pathname
++ifdef M
++ccflags-y += -include ${M}/../../include/linux/aufs_type.h
++else
++ccflags-y += -include ${srctree}/include/linux/aufs_type.h
++endif
 +
 +obj-$(CONFIG_AUFS_FS) += aufs.o
 +aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o \
@@ -18828,10 +18836,10 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,195 @@
++++ linux/fs/aufs/module.c     2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,196 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -18897,8 +18905,9 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +{
 +      int i;
 +
-+      /* including AuCache_HNOTIFY */
-+      for (i = 0; i < AuCache_Last; i++)
++      /* excluding AuCache_HNOTIFY */
++      BUILD_BUG_ON(AuCache_HNOTIFY + 1 != AuCache_Last);
++      for (i = 0; i < AuCache_HNOTIFY; i++)
 +              if (au_cachep[i]) {
 +                      kmem_cache_destroy(au_cachep[i]);
 +                      au_cachep[i] = NULL;
@@ -19027,10 +19036,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,107 @@
++++ linux/fs/aufs/module.h     2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,105 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -19105,9 +19114,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +      AuCache_FINFO,
 +      AuCache_VDIR,
 +      AuCache_DEHSTR,
-+#ifdef CONFIG_AUFS_HNOTIFY
-+      AuCache_HNOTIFY,
-+#endif
++      AuCache_HNOTIFY, /* must be last */
 +      AuCache_Last
 +};
 +
@@ -19138,10 +19145,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,1679 @@
++++ linux/fs/aufs/opts.c       2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,1677 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -19162,8 +19169,6 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 + * mount options/flags
 + */
 +
-+#include <linux/file.h>
-+#include <linux/jiffies.h>
 +#include <linux/namei.h>
 +#include <linux/types.h> /* a distribution requires */
 +#include <linux/parser.h>
@@ -20821,10 +20826,10 @@ 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       2011-10-24 20:51:51.580466925 +0200
-@@ -0,0 +1,210 @@
++++ linux/fs/aufs/opts.h       2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,209 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -20851,7 +20856,6 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 +#ifdef __KERNEL__
 +
 +#include <linux/path.h>
-+#include <linux/aufs_type.h>
 +
 +struct file;
 +struct super_block;
@@ -21035,10 +21039,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/plink.c      2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,515 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -21554,10 +21558,10 @@ 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       2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/poll.c       2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,56 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -21614,10 +21618,10 @@ 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-01-05 11:00:59.218835185 +0100
++++ linux/fs/aufs/procfs.c     2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,170 @@
 +/*
-+ * Copyright (C) 2010-2011 Junjiro R. Okajima
++ * Copyright (C) 2010-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
@@ -21788,10 +21792,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,385 @@
++++ linux/fs/aufs/rdu.c        2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,384 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -21815,8 +21819,6 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +#include <linux/compat.h>
 +#include <linux/fs_stack.h>
 +#include <linux/security.h>
-+#include <linux/uaccess.h>
-+#include <linux/aufs_type.h>
 +#include "aufs.h"
 +
 +/* bits for struct aufs_rdu.flags */
@@ -21889,6 +21891,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +      loff_t offset;
 +      struct au_rdu_cookie *cookie = &arg->rdu->cookie;
 +
++      /* we don't have to care (FMODE_32BITHASH | FMODE_64BITHASH) for ext4 */
 +      offset = vfsub_llseek(h_file, cookie->h_pos, SEEK_SET);
 +      err = offset;
 +      if (unlikely(offset != cookie->h_pos))
@@ -22177,10 +22180,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,189 @@
++++ linux/fs/aufs/rwsem.h      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,188 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -22206,7 +22209,6 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/rwsem.h>
 +#include "debug.h"
 +
 +struct au_rwsem {
@@ -22370,10 +22372,10 @@ 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     2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,344 @@
++++ linux/fs/aufs/sbinfo.c     2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,343 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -22394,7 +22396,6 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 + * superblock private data
 + */
 +
-+#include <linux/jiffies.h>
 +#include "aufs.h"
 +
 +/*
@@ -22718,10 +22719,10 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +}
 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        2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,66 @@
++++ linux/fs/aufs/spl.h        2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,62 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -22747,10 +22748,6 @@ diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/spinlock.h>
-+#include <linux/list.h>
-+#include <linux/rculist.h>
-+
 +struct au_splhead {
 +      spinlock_t              spin;
 +      struct list_head        head;
@@ -22788,10 +22785,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,939 @@
++++ linux/fs/aufs/super.c      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,962 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -22812,8 +22809,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 + * mount and super_block operations
 + */
 +
-+#include <linux/buffer_head.h>
-+#include <linux/jiffies.h>
++#include <linux/mm.h>
 +#include <linux/module.h>
 +#include <linux/seq_file.h>
 +#include <linux/statfs.h>
@@ -22956,7 +22952,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +      }
 +}
 +
-+static int au_show_xino(struct seq_file *seq, struct vfsmount *mnt)
++static int au_show_xino(struct seq_file *seq, struct super_block *sb)
 +{
 +#ifdef CONFIG_SYSFS
 +      return 0;
@@ -22964,7 +22960,6 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +      int err;
 +      const int len = sizeof(AUFS_XINO_FNAME) - 1;
 +      aufs_bindex_t bindex, brid;
-+      struct super_block *sb;
 +      struct qstr *name;
 +      struct file *f;
 +      struct dentry *d, *h_root;
@@ -22973,7 +22968,6 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +      AuRwMustAnyLock(&sbinfo->si_rwsem);
 +
 +      err = 0;
-+      sb = mnt->mnt_sb;
 +      f = au_sbi(sb)->si_xib;
 +      if (!f)
 +              goto out;
@@ -23003,7 +22997,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +}
 +
 +/* seq_file will re-call me in case of too long string */
-+static int aufs_show_options(struct seq_file *m, struct vfsmount *mnt)
++static int aufs_show_options(struct seq_file *m, struct dentry *dentry)
 +{
 +      int err;
 +      unsigned int mnt_flags, v;
@@ -23028,14 +23022,14 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +} while (0)
 +
 +      /* lock free root dinfo */
-+      sb = mnt->mnt_sb;
++      sb = dentry->d_sb;
 +      si_noflush_read_lock(sb);
 +      sbinfo = au_sbi(sb);
 +      seq_printf(m, ",si=%lx", sysaufs_si_id(sbinfo));
 +
 +      mnt_flags = au_mntflags(sb);
 +      if (au_opt_test(mnt_flags, XINO)) {
-+              err = au_show_xino(m, mnt);
++              err = au_show_xino(m, sb);
 +              if (unlikely(err))
 +                      goto out;
 +      } else
@@ -23098,7 +23092,18 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +
 +      old = a;
 +      a += b;
-+      if (old < a)
++      if (old <= a)
++              return a;
++      return ULLONG_MAX;
++}
++
++static u64 au_mul_till_max(u64 a, long mul)
++{
++      u64 old;
++
++      old = a;
++      a *= mul;
++      if (old <= a)
 +              return a;
 +      return ULLONG_MAX;
 +}
@@ -23106,25 +23111,26 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +static int au_statfs_sum(struct super_block *sb, struct kstatfs *buf)
 +{
 +      int err;
++      long bsize, factor;
 +      u64 blocks, bfree, bavail, files, ffree;
 +      aufs_bindex_t bend, bindex, i;
 +      unsigned char shared;
 +      struct path h_path;
 +      struct super_block *h_sb;
 +
++      err = 0;
++      bsize = LONG_MAX;
++      files = 0;
++      ffree = 0;
 +      blocks = 0;
 +      bfree = 0;
 +      bavail = 0;
-+      files = 0;
-+      ffree = 0;
-+
-+      err = 0;
 +      bend = au_sbend(sb);
-+      for (bindex = bend; bindex >= 0; bindex--) {
++      for (bindex = 0; bindex <= bend; bindex++) {
 +              h_path.mnt = au_sbr_mnt(sb, bindex);
 +              h_sb = h_path.mnt->mnt_sb;
 +              shared = 0;
-+              for (i = bindex + 1; !shared && i <= bend; i++)
++              for (i = 0; !shared && i < bindex; i++)
 +                      shared = (au_sbr_sb(sb, i) == h_sb);
 +              if (shared)
 +                      continue;
@@ -23135,18 +23141,36 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +              if (unlikely(err))
 +                      goto out;
 +
-+              blocks = au_add_till_max(blocks, buf->f_blocks);
-+              bfree = au_add_till_max(bfree, buf->f_bfree);
-+              bavail = au_add_till_max(bavail, buf->f_bavail);
++              if (bsize > buf->f_bsize) {
++                      /*
++                       * we will reduce bsize, so we have to expand blocks
++                       * etc. to match them again
++                       */
++                      factor = (bsize / buf->f_bsize);
++                      blocks = au_mul_till_max(blocks, factor);
++                      bfree = au_mul_till_max(bfree, factor);
++                      bavail = au_mul_till_max(bavail, factor);
++                      bsize = buf->f_bsize;
++              }
++
++              factor = (buf->f_bsize / bsize);
++              blocks = au_add_till_max(blocks,
++                              au_mul_till_max(buf->f_blocks, factor));
++              bfree = au_add_till_max(bfree,
++                              au_mul_till_max(buf->f_bfree, factor));
++              bavail = au_add_till_max(bavail,
++                              au_mul_till_max(buf->f_bavail, factor));
 +              files = au_add_till_max(files, buf->f_files);
 +              ffree = au_add_till_max(ffree, buf->f_ffree);
 +      }
 +
++      buf->f_bsize = bsize;
 +      buf->f_blocks = blocks;
 +      buf->f_bfree = bfree;
 +      buf->f_bavail = bavail;
 +      buf->f_files = files;
 +      buf->f_ffree = ffree;
++      buf->f_frsize = 0;
 +
 +out:
 +      return err;
@@ -23568,12 +23592,12 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +      set_nlink(inode, 2);
 +      unlock_new_inode(inode);
 +
-+      root = d_alloc_root(inode);
++      root = d_make_root(inode);
 +      if (unlikely(!root))
-+              goto out_iput;
++              goto out;
 +      err = PTR_ERR(root);
 +      if (IS_ERR(root))
-+              goto out_iput;
++              goto out;
 +
 +      err = au_di_init(root);
 +      if (!err) {
@@ -23581,13 +23605,9 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +              return 0; /* success */
 +      }
 +      dput(root);
-+      goto out; /* do not iput */
 +
-+out_iput:
-+      iget_failed(inode);
 +out:
 +      return err;
-+
 +}
 +
 +static int aufs_fill_super(struct super_block *sb, void *raw_data,
@@ -23731,10 +23751,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,547 @@
++++ linux/fs/aufs/super.h      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,546 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -23761,7 +23781,6 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +#ifdef __KERNEL__
 +
 +#include <linux/fs.h>
-+#include <linux/aufs_type.h>
 +#include "rwsem.h"
 +#include "spl.h"
 +#include "wkq.h"
@@ -24282,10 +24301,10 @@ 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    2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,107 @@
++++ linux/fs/aufs/sysaufs.c    2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,105 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -24307,9 +24326,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 + * they are necessary regardless sysfs is disabled.
 + */
 +
-+#include <linux/fs.h>
 +#include <linux/random.h>
-+#include <linux/sysfs.h>
 +#include "aufs.h"
 +
 +unsigned long sysaufs_si_mask;
@@ -24393,10 +24410,10 @@ 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    2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,105 @@
++++ linux/fs/aufs/sysaufs.h    2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,104 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -24423,7 +24440,6 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 +#ifdef __KERNEL__
 +
 +#include <linux/sysfs.h>
-+#include <linux/aufs_type.h>
 +#include "module.h"
 +
 +struct super_block;
@@ -24502,10 +24518,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,260 @@
++++ linux/fs/aufs/sysfs.c      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,257 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -24526,10 +24542,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 + * sysfs interface
 + */
 +
-+#include <linux/fs.h>
-+#include <linux/module.h>
 +#include <linux/seq_file.h>
-+#include <linux/sysfs.h>
 +#include "aufs.h"
 +
 +#ifdef CONFIG_AUFS_FS_MODULE
@@ -24766,10 +24779,10 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +}
 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      2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,151 @@
++++ linux/fs/aufs/sysrq.c      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,148 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -24790,9 +24803,6 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 + * magic sysrq hanlder
 + */
 +
-+#include <linux/fs.h>
-+#include <linux/module.h>
-+#include <linux/moduleparam.h>
 +/* #include <linux/sysrq.h> */
 +#include <linux/writeback.h>
 +#include "aufs.h"
@@ -24921,10 +24931,10 @@ 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       2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,886 @@
++++ linux/fs/aufs/vdir.c       2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,885 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -24945,7 +24955,6 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 + * virtual or vertical directory
 + */
 +
-+#include <linux/hash.h>
 +#include "aufs.h"
 +
 +static unsigned int calc_size(int nlen)
@@ -25811,10 +25820,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,837 @@
++++ linux/fs/aufs/vfsub.c      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,832 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -25835,12 +25844,10 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 + * sub-routines for VFS
 + */
 +
-+#include <linux/file.h>
 +#include <linux/ima.h>
 +#include <linux/namei.h>
 +#include <linux/security.h>
 +#include <linux/splice.h>
-+#include <linux/uaccess.h>
 +#include "aufs.h"
 +
 +int vfsub_update_h_iattr(struct path *h_path, int *did)
@@ -25956,22 +25963,19 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 + */
 +int vfsub_name_hash(const char *name, struct qstr *this, int len)
 +{
-+      unsigned long hash;
 +      unsigned int c;
 +
 +      this->name = name;
 +      this->len = len;
++      this->hash = full_name_hash(name, len);
 +      if (!len)
 +              return -EACCES;
 +
-+      hash = init_name_hash();
 +      while (len--) {
 +              c = *(const unsigned char *)name++;
 +              if (c == '/' || c == '\0')
 +                      return -EACCES;
-+              hash = partial_name_hash(c, hash);
 +      }
-+      this->hash = end_name_hash(hash);
 +      return 0;
 +}
 +
@@ -26652,10 +26656,10 @@ 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      2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/vfsub.h      2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,232 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -26823,7 +26827,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +              .dentry = h_dentry,
 +              .mnt    = h_mnt
 +      };
-+      touch_atime(h_mnt, h_dentry);
++      touch_atime(&h_path);
 +      vfsub_update_h_iattr(&h_path, /*did*/NULL); /*ignore*/
 +}
 +
@@ -26888,10 +26892,10 @@ 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 2011-08-24 13:30:24.734646739 +0200
++++ linux/fs/aufs/wbr_policy.c 2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,700 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -27592,10 +27596,10 @@ 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      2011-10-24 20:51:51.583800333 +0200
-@@ -0,0 +1,1050 @@
++++ linux/fs/aufs/whout.c      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,1049 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -27616,7 +27620,6 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 + * whiteout for logical deletion and opaque directory
 + */
 +
-+#include <linux/fs.h>
 +#include "aufs.h"
 +
 +#define WH_MASK                       S_IRUGO
@@ -28646,10 +28649,10 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +}
 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      2011-08-24 13:30:24.734646739 +0200
-@@ -0,0 +1,89 @@
++++ linux/fs/aufs/whout.h      2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,88 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -28675,7 +28678,6 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/aufs_type.h>
 +#include "dir.h"
 +
 +/* whout.c */
@@ -28739,10 +28741,10 @@ 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-01-05 11:00:59.218835185 +0100
++++ linux/fs/aufs/wkq.c        2012-05-22 09:06:08.870792417 +0200
 @@ -0,0 +1,214 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -28957,10 +28959,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,96 @@
++++ linux/fs/aufs/wkq.h        2012-05-22 09:06:08.870792417 +0200
+@@ -0,0 +1,92 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -28987,10 +28989,6 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 +
 +#ifdef __KERNEL__
 +
-+#include <linux/sched.h>
-+#include <linux/wait.h>
-+#include <linux/aufs_type.h>
-+
 +struct super_block;
 +
 +/* ---------------------------------------------------------------------- */
@@ -29057,10 +29055,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,1266 @@
++++ linux/fs/aufs/xino.c       2012-05-22 09:06:08.874125894 +0200
+@@ -0,0 +1,1264 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -29081,9 +29079,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 + * external inode number translation table and bitmap
 + */
 +
-+#include <linux/file.h>
 +#include <linux/seq_file.h>
-+#include <linux/uaccess.h>
 +#include "aufs.h"
 +
 +/* todo: unnecessary to support mmap_sem since kernel-space? */
@@ -30327,10 +30323,10 @@ 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-01-05 11:00:59.218835185 +0100
-@@ -0,0 +1,224 @@
++++ linux/include/linux/aufs_type.h    2012-05-23 12:07:43.277739181 +0200
+@@ -0,0 +1,233 @@
 +/*
-+ * Copyright (C) 2005-2011 Junjiro R. Okajima
++ * Copyright (C) 2005-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
@@ -30350,17 +30346,27 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
 +#ifndef __AUFS_TYPE_H__
 +#define __AUFS_TYPE_H__
 +
-+#include <linux/ioctl.h>
-+#include <linux/kernel.h>
-+#include <linux/limits.h>
++#define AUFS_NAME     "aufs"
++
 +#ifdef __KERNEL__
-+#include <linux/types.h>
++/*
++ * define it before including all other headers.
++ * sched.h may use pr_* macros before defining "current", so define the
++ * no-current version first, and re-define later.
++ */
++#define pr_fmt(fmt)   AUFS_NAME " %s:%d: " fmt, __func__, __LINE__
++#include <linux/sched.h>
++#undef pr_fmt
++#define pr_fmt(fmt)   AUFS_NAME " %s:%d:%s[%d]: " fmt, \
++              __func__, __LINE__, current->comm, current->pid
 +#else
 +#include <stdint.h>
 +#include <sys/types.h>
-+#endif
++#endif /* __KERNEL__ */
 +
-+#define AUFS_VERSION  "3.x-rcN-20111205"
++#include <linux/limits.h>
++
++#define AUFS_VERSION  "3.4-20120521"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC      ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -30389,7 +30395,6 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
 +
 +/* ---------------------------------------------------------------------- */
 +
-+#define AUFS_NAME             "aufs"
 +#define AUFS_FSTYPE           AUFS_NAME
 +
 +#define AUFS_ROOT_INO         2
@@ -30554,13 +30559,3 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
 +
 +#endif /* __AUFS_TYPE_H__ */
 
---- linux-3.2/security/device_cgroup.c~        2012-01-05 13:48:24.000000000 +0100
-+++ linux-3.2/security/device_cgroup.c 2012-01-05 14:02:48.910843473 +0100
-@@ -13,6 +13,7 @@
- #include <linux/slab.h>
- #include <linux/rcupdate.h>
- #include <linux/mutex.h>
-+#include <linux/module.h>
- #define ACC_MKNOD 1
- #define ACC_READ  2
This page took 0.29422 seconds and 4 git commands to generate.