[packages/kernel] - initial 3.13; doesn't build (lack of vserver, imq, aufs and likely more)

arekm arekm at pld-linux.org
Mon Jan 20 20:34:01 CET 2014


commit 523b37e3f08a25065f4facd124e137685c2da2dc
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Jan 20 20:33:56 2014 +0100

    - initial 3.13; doesn't build (lack of vserver, imq, aufs and likely more)

 kernel-aufs3.patch      | 1547 +++++++++++++++++++++++------------------------
 kernel-multiarch.config |  160 ++++-
 kernel.spec             |    6 +-
 3 files changed, 894 insertions(+), 819 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index d3e999d..2ecb5ca 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -68,8 +68,8 @@
 %endif
 
 %define		rel		0.1
-%define		basever		3.12
-%define		postver		.3
+%define		basever		3.13
+%define		postver		.0
 
 # __alt_kernel is list of features, empty string if none set
 # _alt kernel is defined as: %{nil}%{?alt_kernel:-%{?alt_kernel}} (defined in rpm.macros)
@@ -109,7 +109,7 @@ Epoch:		3
 License:	GPL v2
 Group:		Base/Kernel
 Source0:	http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
-# Source0-md5:	cc6ee608854e0da4b64f6c1ff8b6398c
+# Source0-md5:	0ecbaf65c00374eb4a826c2f9f37606f
 %if "%{postver}" != ".0"
 Patch0:		http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
 # Patch0-md5:	b7a603bf67e69936cf049fc6b37d9085
diff --git a/kernel-aufs3.patch b/kernel-aufs3.patch
index 7639034..f3f1d5e 100644
--- a/kernel-aufs3.patch
+++ b/kernel-aufs3.patch
@@ -22,7 +22,7 @@ index 4fe6df3..4a57676 100644
  obj-$(CONFIG_EFIVAR_FS)		+= efivarfs/
 +obj-$(CONFIG_AUFS_FS)           += aufs/
 diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
-index 115add2..ce305b3 100644
+index 33d2b8f..b55eeb9 100644
 --- a/include/uapi/linux/Kbuild
 +++ b/include/uapi/linux/Kbuild
 @@ -56,6 +56,7 @@ header-y += atmppp.h
@@ -36,7 +36,7 @@ index 115add2..ce305b3 100644
 aufs3.x-rcN base patch
 
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 40e7155..6e43ab0 100644
+index c8dac73..2e229ac 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
 @@ -691,6 +691,24 @@ static inline int is_loop_device(struct file *file)
@@ -64,41 +64,11 @@ index 40e7155..6e43ab0 100644
  /* loop sysfs attributes */
  
  static ssize_t loop_attr_show(struct device *dev, char *page,
-diff --git a/fs/file_table.c b/fs/file_table.c
-index abdd15a..da0ee1e 100644
---- a/fs/file_table.c
-+++ b/fs/file_table.c
-@@ -36,7 +36,7 @@ struct files_stat_struct files_stat = {
- 	.max_files = NR_FILE
- };
- 
--DEFINE_STATIC_LGLOCK(files_lglock);
-+DEFINE_LGLOCK(files_lglock);
- 
- /* SLAB cache for file structures */
- static struct kmem_cache *filp_cachep __read_mostly;
-@@ -360,7 +360,7 @@ static inline int file_list_cpu(struct file *file)
- }
- 
- /* helper for file_sb_list_add to reduce ifdefs */
--static inline void __file_sb_list_add(struct file *file, struct super_block *sb)
-+inline void __file_sb_list_add(struct file *file, struct super_block *sb)
- {
- 	struct list_head *list;
- #ifdef CONFIG_SMP
-@@ -373,6 +373,7 @@ static inline void __file_sb_list_add(struct file *file, struct super_block *sb)
- #endif
- 	list_add(&file->f_u.fu_list, list);
- }
-+EXPORT_SYMBOL(__file_sb_list_add);
- 
- /**
-  * file_sb_list_add - add a file to the sb's file list
 diff --git a/fs/inode.c b/fs/inode.c
-index b33ba8e..9b24434 100644
+index 4bcdad3..bc83168 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
-@@ -1469,7 +1469,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
+@@ -1497,7 +1497,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
   * This does the actual work of updating an inodes time or version.  Must have
   * had called mnt_want_write() before calling this.
   */
@@ -108,7 +78,7 @@ index b33ba8e..9b24434 100644
  	if (inode->i_op->update_time)
  		return inode->i_op->update_time(inode, time, flags);
 diff --git a/fs/splice.c b/fs/splice.c
-index 3b7ee65..e147583 100644
+index 46a08f7..719ca3e 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
 @@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@@ -136,10 +106,10 @@ index 3b7ee65..e147583 100644
  	ssize_t (*splice_read)(struct file *, loff_t *,
  			       struct pipe_inode_info *, size_t, unsigned int);
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 3f40547..36b235e 100644
+index 121f11f..39bf86d 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -2594,6 +2594,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
+@@ -2657,6 +2657,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
  extern int inode_newsize_ok(const struct inode *, loff_t offset);
  extern void setattr_copy(struct inode *inode, const struct iattr *attr);
  
@@ -164,29 +134,8 @@ index 74575cb..bfc6fb6 100644
  #endif
 aufs3.x-rcN standalone patch
 
-diff --git a/fs/file_table.c b/fs/file_table.c
-index da0ee1e..0a02e12 100644
---- a/fs/file_table.c
-+++ b/fs/file_table.c
-@@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
- };
- 
- DEFINE_LGLOCK(files_lglock);
-+EXPORT_SYMBOL(files_lglock);
- 
- /* SLAB cache for file structures */
- static struct kmem_cache *filp_cachep __read_mostly;
-@@ -410,6 +411,8 @@ void file_sb_list_del(struct file *file)
- 	}
- }
- 
-+EXPORT_SYMBOL(file_sb_list_del);
-+
- #ifdef CONFIG_SMP
- 
- /*
 diff --git a/fs/inode.c b/fs/inode.c
-index 9b24434..6ee4b0b 100644
+index bc83168..6dd1207 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -57,6 +57,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@@ -197,7 +146,7 @@ index 9b24434..6ee4b0b 100644
  
  /*
   * Empty aops. Can be used for the cases where the user does not
-@@ -1485,6 +1486,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
+@@ -1513,6 +1514,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
  	mark_inode_dirty_sync(inode);
  	return 0;
  }
@@ -206,18 +155,10 @@ index 9b24434..6ee4b0b 100644
  /**
   *	touch_atime	-	update the access time
 diff --git a/fs/namespace.c b/fs/namespace.c
-index da5c494..f40ae6f 100644
+index ac2ce8a..83b0135 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -54,6 +54,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
-  * tree or hash is modified or when a vfsmount structure is modified.
-  */
- DEFINE_BRLOCK(vfsmount_lock);
-+EXPORT_SYMBOL(vfsmount_lock);
- 
- static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
- {
-@@ -427,6 +428,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
+@@ -425,6 +425,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
  	mnt_dec_writers(real_mount(mnt));
  	preempt_enable();
  }
@@ -225,7 +166,7 @@ index da5c494..f40ae6f 100644
  
  /**
   * mnt_drop_write - give up write access to a mount
-@@ -1480,6 +1482,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1509,6 +1510,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
  	}
  	return 0;
  }
@@ -306,10 +247,10 @@ index 923fe4a..176b435 100644
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index d420331..6dd3b03 100644
+index 4b3e1ed..ce49f2b 100644
 --- a/fs/open.c
 +++ b/fs/open.c
-@@ -61,6 +61,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
+@@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
  	mutex_unlock(&dentry->d_inode->i_mutex);
  	return ret;
  }
@@ -318,7 +259,7 @@ index d420331..6dd3b03 100644
  long vfs_truncate(struct path *path, loff_t length)
  {
 diff --git a/fs/splice.c b/fs/splice.c
-index e147583..789f6b2 100644
+index 719ca3e..6300dc8 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
 @@ -1106,6 +1106,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -354,7 +295,7 @@ index b9d613e..ba3b618 100644
  }
 +EXPORT_SYMBOL(cap_mmap_file);
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index c123628..efc6f68 100644
+index 7c2a0a7..a37c054 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
 @@ -7,6 +7,7 @@
@@ -365,7 +306,7 @@ index c123628..efc6f68 100644
  #include <linux/list.h>
  #include <linux/uaccess.h>
  #include <linux/seq_file.h>
-@@ -756,6 +757,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
+@@ -745,6 +746,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
  	return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
  			access);
  }
@@ -374,7 +315,7 @@ index c123628..efc6f68 100644
  int devcgroup_inode_mknod(int mode, dev_t dev)
  {
 diff --git a/security/security.c b/security/security.c
-index 4dc31f4..1f272bc 100644
+index 15b6928..ae6eba6 100644
 --- a/security/security.c
 +++ b/security/security.c
 @@ -407,6 +407,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
@@ -548,10 +489,10 @@ 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	2013-07-06 13:20:47.730197761 +0200
-@@ -0,0 +1,162 @@
++++ linux/Documentation/filesystems/aufs/design/01intro.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,161 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -564,8 +505,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Introduction
 +----------------------------------------
@@ -714,10 +654,10 @@ 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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,243 @@
++++ linux/Documentation/filesystems/aufs/design/02struct.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,242 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -730,8 +670,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Basic Aufs Internal Structure
 +
@@ -961,10 +900,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +For this purpose, use "aumvdown" command in aufs-util.git.
 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	2013-07-06 13:20:47.730197761 +0200
-@@ -0,0 +1,106 @@
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,105 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -977,8 +916,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Lookup in a Branch
 +----------------------------------------------------------------------
@@ -1071,10 +1009,10 @@ 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	2013-07-06 13:20:47.730197761 +0200
-@@ -0,0 +1,76 @@
++++ linux/Documentation/filesystems/aufs/design/04branch.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,75 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1087,8 +1025,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Branch Manipulation
 +
@@ -1151,10 +1088,10 @@ 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	2013-07-06 13:20:47.730197761 +0200
-@@ -0,0 +1,65 @@
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,64 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1167,8 +1104,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Policies to Select One among Multiple Writable Branches
 +----------------------------------------------------------------------
@@ -1220,10 +1156,10 @@ 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	2013-07-06 13:20:47.730197761 +0200
-@@ -0,0 +1,47 @@
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,46 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1236,8 +1172,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +mmap(2) -- File Memory Mapping
 +----------------------------------------------------------------------
@@ -1271,10 +1206,10 @@ 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	2013-07-06 13:20:47.736864659 +0200
-@@ -0,0 +1,59 @@
++++ linux/Documentation/filesystems/aufs/design/07export.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,58 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1287,8 +1222,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Export Aufs via NFS
 +----------------------------------------------------------------------
@@ -1334,10 +1268,10 @@ 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	2013-07-06 13:20:47.736864659 +0200
-@@ -0,0 +1,53 @@
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,52 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1350,8 +1284,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Show Whiteout Mode (shwh)
 +----------------------------------------------------------------------
@@ -1391,10 +1324,10 @@ 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	2013-07-06 13:20:47.736864659 +0200
-@@ -0,0 +1,47 @@
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,46 @@
 +
-+# Copyright (C) 2010-2013 Junjiro R. Okajima
++# Copyright (C) 2010-2014 Junjiro R. Okajima
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1407,8 +1340,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Dynamically customizable FS operations
 +----------------------------------------------------------------------
@@ -1442,10 +1374,10 @@ 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	2013-07-06 13:20:47.736864659 +0200
-@@ -0,0 +1,96 @@
++++ linux/Documentation/filesystems/aufs/design/99plan.txt	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,95 @@
 +
-+# Copyright (C) 2005-2013 Junjiro R. Okajima
++# Copyright (C) 2005-2014 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1458,8 +1390,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt linu
 +# GNU General Public License for more details.
 +# 
 +# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +Plan
 +
@@ -1542,8 +1473,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,347 @@
++++ linux/Documentation/filesystems/aufs/README	2014-01-20 20:16:14.729463171 +0100
+@@ -0,0 +1,344 @@
 +
 +Aufs3 -- advanced multi layered unification filesystem version 3.x
 +http://aufs.sf.net
@@ -1714,9 +1645,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +1.
 +- apply ./aufs3-kbuild.patch to your kernel source files.
 +- apply ./aufs3-base.patch too.
-+- apply ./aufs3-proc_map.patch too, if you want to make /proc/PID/maps (and
-+  others including lsof(1)) show the file path on aufs instead of the
-+  path on the branch fs.
++- apply ./aufs3-mmap.patch too.
 +- apply ./aufs3-standalone.patch too, if you have a plan to set
 +  CONFIG_AUFS_FS=m. otherwise you don't need ./aufs3-standalone.patch.
 +- copy ./{Documentation,fs,include/uapi/linux/aufs_type.h} files to your
@@ -1736,9 +1665,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +2.
 +- module only (CONFIG_AUFS_FS=m).
 +- apply ./aufs3-base.patch to your kernel source files.
-+- apply ./aufs3-proc_map.patch too to your kernel source files,
-+  if you want to make /proc/PID/maps (and others including lsof(1)) show
-+  the file path on aufs instead of the path on the branch fs.
++- apply ./aufs3-mmap.patch too.
 +- apply ./aufs3-standalone.patch too.
 +- build your kernel, don't forget "make headers_install", and reboot.
 +- edit ./config.mk and set other aufs configurations if necessary.
@@ -1873,7 +1800,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +Alessandro Gorreta made a donation (2013/4).
 +lauri kasvandik made a donation (2013/5).
 +"pemasu from Finland" made a donation (2013/7).
-+The Parted Magic Project made a donation (2013/9).
++The Parted Magic Project made a donation (2013/9 and 11).
++Pavel Barta made a donation (2013/10).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -1893,10 +1821,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	2013-07-06 13:20:47.736864659 +0200
-@@ -0,0 +1,60 @@
++++ linux/fs/aufs/aufs.h	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,59 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -1909,8 +1837,7 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -1957,10 +1884,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,1212 @@
++++ linux/fs/aufs/branch.c	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,1219 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -1973,8 +1900,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -2326,7 +2252,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +
 +	/*
 +	 * a limit for rmdir/rename a dir
-+	 * cf. AUFS_MAX_NAMELEN in include/linux/aufs_type.h
++	 * cf. AUFS_MAX_NAMELEN in include/uapi/linux/aufs_type.h
 +	 */
 +	err = vfs_statfs(&br->br_path, &kst);
 +	if (unlikely(err))
@@ -2335,8 +2261,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	if (kst.f_namelen >= NAME_MAX)
 +		err = au_br_init_wh(sb, br, perm);
 +	else
-+		pr_err("%.*s(%s), unsupported namelen %ld\n",
-+		       AuDLNPair(au_br_dentry(br)),
++		pr_err("%pd(%s), unsupported namelen %ld\n",
++		       au_br_dentry(br),
 +		       au_sbtype(au_br_dentry(br)->d_sb), kst.f_namelen);
 +
 +out:
@@ -2601,7 +2527,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +			    && au_h_dptr(d, bindex)
 +			    && au_test_dbusy(d, bstart, bend)) {
 +				err = -EBUSY;
-+				AuVerbose(verbose, "busy %.*s\n", AuDLNPair(d));
++				AuVerbose(verbose, "busy %pd\n", d);
 +				AuDbgDentry(d);
 +			}
 +			di_read_unlock(d, AuLock_IR);
@@ -2965,22 +2891,25 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +{
 +	unsigned long long n;
 +	struct file **p, *f;
++	struct au_sphlhead *files;
++	struct au_finfo *finfo;
 +	struct super_block *sb = arg;
 +
 +	n = 0;
 +	p = a;
-+	lg_global_lock(&files_lglock);
-+	do_file_list_for_each_entry(sb, f) {
-+		if (au_fi(f)
-+		    && file_count(f)
++	files = &au_sbi(sb)->si_files;
++	spin_lock(&files->spin);
++	hlist_for_each_entry(finfo, &files->head, fi_hlist) {
++		f = finfo->fi_file;
++		if (file_count(f)
 +		    && !special_file(file_inode(f)->i_mode)) {
 +			get_file(f);
 +			*p++ = f;
 +			n++;
 +			AuDebugOn(n > max);
 +		}
-+	} while_file_list_for_each_entry;
-+	lg_global_unlock(&files_lglock);
++	}
++	spin_unlock(&files->spin);
 +
 +	return n;
 +}
@@ -3026,12 +2955,11 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	for (ull = 0; ull < max; ull++) {
 +		file = array[ull];
 +
-+		/* AuDbg("%.*s\n", AuDLNPair(file->f_dentry)); */
++		/* AuDbg("%pD\n", file); */
 +		fi_read_lock(file);
 +		if (unlikely(au_test_mmapped(file))) {
 +			err = -EBUSY;
-+			AuVerbose(verbose, "mmapped %.*s\n",
-+				  AuDLNPair(file->f_dentry));
++			AuVerbose(verbose, "mmapped %pD\n", file);
 +			AuDbgFile(file);
 +			FiMustNoWaiters(file);
 +			fi_read_unlock(file);
@@ -3066,7 +2994,13 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +			continue;
 +
 +		/* todo: already flushed? */
-+		/* cf. fs/super.c:mark_files_ro() */
++		/*
++		 * fs/super.c:mark_files_ro() is gone, but aufs keeps its
++		 * approach which resets f_mode and calls mnt_drop_write() and
++		 * file_release_write() for each file, because the branch
++		 * attribute in aufs world is totally different from the native
++		 * fs rw/ro mode.
++		*/
 +		/* fi_read_lock(file); */
 +		hfile = &au_fi(file)->fi_htop;
 +		hf = hfile->hf_file;
@@ -3173,10 +3107,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,265 @@
++++ linux/fs/aufs/branch.h	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,264 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -3189,8 +3123,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -3442,8 +3375,8 @@ 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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,38 @@
++++ linux/fs/aufs/conf.mk	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,37 @@
 +
 +AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
 +
@@ -3458,7 +3391,6 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 +	HNOTIFY HFSNOTIFY \
 +	EXPORT INO_T_64 \
 +	RDU \
-+	PROC_MAP \
 +	SP_IATTR \
 +	SHWH \
 +	BR_RAMFS \
@@ -3484,10 +3416,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,1268 @@
++++ linux/fs/aufs/cpup.c	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,1277 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -3500,8 +3432,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -3632,7 +3563,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	attr.ia_valid = ATTR_FORCE | ATTR_MTIME | ATTR_MTIME_SET
 +		| ATTR_ATIME | ATTR_ATIME_SET;
 +
-+	err = vfsub_notify_change(&dt->dt_h_path, &attr);
++	/* no delegation since this is a directory */
++	err = vfsub_notify_change(&dt->dt_h_path, &attr, /*delegated*/NULL);
 +	if (unlikely(err))
 +		pr_warn("restoring timestamps failed(%d). ignored\n", err);
 +}
@@ -3689,13 +3621,14 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +		sbits = !!(h_isrc->i_mode & (S_ISUID | S_ISGID));
 +		au_cpup_attr_flags(h_idst, h_isrc->i_flags);
 +	}
-+	err = vfsub_notify_change(&h_path, &ia);
++	/* no delegation since it is just created */
++	err = vfsub_notify_change(&h_path, &ia, /*delegated*/NULL);
 +
 +	/* is this nfs only? */
 +	if (!err && sbits && au_test_nfs(h_path.dentry->d_sb)) {
 +		ia.ia_valid = ATTR_FORCE | ATTR_MODE;
 +		ia.ia_mode = h_isrc->i_mode;
-+		err = vfsub_notify_change(&h_path, &ia);
++		err = vfsub_notify_change(&h_path, &ia, /*delegated*/NULL);
 +	}
 +
 +	return err;
@@ -3792,7 +3725,9 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +			ia->ia_file = dst;
 +			h_mtx = &file_inode(dst)->i_mutex;
 +			mutex_lock_nested(h_mtx, AuLsc_I_CHILD2);
-+			err = vfsub_notify_change(&dst->f_path, ia);
++			/* no delegation since it is just created */
++			err = vfsub_notify_change(&dst->f_path, ia,
++						  /*delegated*/NULL);
 +			mutex_unlock(h_mtx);
 +		}
 +	}
@@ -3849,20 +3784,18 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +		struct dentry *dentry;
 +		int force_wr;
 +		struct file *file;
-+		void *label, *label_file;
++		void *label;
 +	} *f, file[] = {
 +		{
 +			.bindex = cpg->bsrc,
 +			.flags = O_RDONLY | O_NOATIME | O_LARGEFILE,
-+			.label = &&out,
-+			.label_file = &&out_src
++			.label = &&out
 +		},
 +		{
 +			.bindex = cpg->bdst,
 +			.flags = O_WRONLY | O_NOATIME | O_LARGEFILE,
 +			.force_wr = !!au_ftest_cpup(cpg->flags, RWDST),
-+			.label = &&out_src,
-+			.label_file = &&out_dst
++			.label = &&out_src
 +		}
 +	};
 +	struct super_block *sb;
@@ -3877,18 +3810,15 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +		err = PTR_ERR(f->file);
 +		if (IS_ERR(f->file))
 +			goto *f->label;
-+		err = -EINVAL;
-+		if (unlikely(!f->file->f_op))
-+			goto *f->label_file;
 +	}
 +
 +	/* try stopping to update while we copyup */
 +	IMustLock(file[SRC].dentry->d_inode);
 +	err = au_copy_file(file[DST].file, file[SRC].file, cpg->len);
 +
-+out_dst:
 +	fput(file[DST].file);
 +	au_sbr_put(sb, file[DST].bindex);
++
 +out_src:
 +	fput(file[SRC].file);
 +	au_sbr_put(sb, file[SRC].bindex);
@@ -4096,8 +4026,9 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	h_parent = h_dentry->d_parent; /* dir inode is locked */
 +	h_dir = h_parent->d_inode;
 +	IMustLock(h_dir);
-+	AuDbg("%.*s %.*s\n", AuDLNPair(h_dentry), AuDLNPair(h_path->dentry));
-+	err = vfsub_rename(h_dir, h_dentry, h_dir, h_path);
++	AuDbg("%pd %pd\n", h_dentry, h_path->dentry);
++	/* no delegation since it is just created */
++	err = vfsub_rename(h_dir, h_dentry, h_dir, h_path, /*delegated*/NULL);
 +	dput(h_path->dentry);
 +
 +out:
@@ -4117,7 +4048,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	aufs_bindex_t old_ibstart;
 +	unsigned char isdir, plink;
 +	struct dentry *h_src, *h_dst, *h_parent;
-+	struct inode *dst_inode, *h_dir, *inode;
++	struct inode *dst_inode, *h_dir, *inode, *delegated;
 +	struct super_block *sb;
 +	struct au_branch *br;
 +	/* to reuduce stack size */
@@ -4182,11 +4113,17 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +			}
 +
 +			a->h_path.dentry = h_dst;
-+			err = vfsub_link(h_src, h_dir, &a->h_path);
++			delegated = NULL;
++			err = vfsub_link(h_src, h_dir, &a->h_path, &delegated);
 +			if (!err && au_ftest_cpup(cpg->flags, RENAME))
 +				err = au_do_ren_after_cpup(cpg, &a->h_path);
 +			if (do_dt)
 +				au_dtime_revert(&a->dt);
++			if (unlikely(err == -EWOULDBLOCK)) {
++				pr_warn("cannot retry for NFSv4 delegation"
++					" for an internal link\n");
++				iput(delegated);
++			}
 +			dput(h_src);
 +			goto out_parent;
 +		} else
@@ -4254,9 +4191,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	a->h_path.dentry = h_dst;
 +	rerr = 0;
 +	if (h_dst->d_inode) {
-+		if (!isdir)
-+			rerr = vfsub_unlink(h_dir, &a->h_path, /*force*/0);
-+		else
++		if (!isdir) {
++			/* no delegation since it is just created */
++			rerr = vfsub_unlink(h_dir, &a->h_path,
++					    /*delegated*/NULL, /*force*/0);
++		} else
 +			rerr = vfsub_rmdir(h_dir, &a->h_path);
 +	}
 +	au_dtime_revert(&a->dt);
@@ -4538,13 +4477,15 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +
 +	dget(wh_dentry);
 +	h_path.dentry = wh_dentry;
-+	if (!S_ISDIR(wh_dentry->d_inode->i_mode))
-+		err = vfsub_unlink(h_parent->d_inode, &h_path, /*force*/0);
-+	else
++	if (!S_ISDIR(wh_dentry->d_inode->i_mode)) {
++		/* no delegation since it is just created */
++		err = vfsub_unlink(h_parent->d_inode, &h_path,
++				   /*delegated*/NULL, /*force*/0);
++	} else
 +		err = vfsub_rmdir(h_parent->d_inode, &h_path);
 +	if (unlikely(err)) {
-+		AuIOErr("failed remove copied-up tmp file %.*s(%d)\n",
-+			AuDLNPair(wh_dentry), err);
++		AuIOErr("failed remove copied-up tmp file %pd(%d)\n",
++			wh_dentry, err);
 +		err = -EIO;
 +	}
 +	au_dtime_revert(&dt);
@@ -4756,10 +4697,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,95 @@
++++ linux/fs/aufs/cpup.h	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,94 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -4772,8 +4713,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -4855,10 +4795,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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,433 @@
++++ linux/fs/aufs/dbgaufs.c	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,432 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -4871,8 +4811,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -5292,10 +5231,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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,49 @@
++++ linux/fs/aufs/dbgaufs.h	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,48 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -5308,8 +5247,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -5345,10 +5283,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	2013-10-26 16:51:29.579631476 +0200
++++ linux/fs/aufs/dcsub.c	2014-01-20 20:16:14.732796615 +0100
 @@ -0,0 +1,243 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -5361,8 +5299,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -5455,6 +5392,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +	return err;
 +}
 +
++/* try d_walk() in linux/fs/dcache.c */
 +int au_dcsub_pages(struct au_dcsub_pages *dpages, struct dentry *root,
 +		   au_dpages_test test, void *arg)
 +{
@@ -5546,7 +5484,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +		goto out;
 +
 +	/*
-+	 * vfsmount_lock is unnecessary since this is a traverse in a single
++	 * RCU for vfsmount is unnecessary since this is a traverse in a single
 +	 * mount
 +	 */
 +	while (!IS_ROOT(dentry)) {
@@ -5592,10 +5530,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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,94 @@
++++ linux/fs/aufs/dcsub.h	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,98 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -5608,8 +5546,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -5652,6 +5589,11 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +
 +/* ---------------------------------------------------------------------- */
 +
++/*
++ * todo: in linux-3.13, several similar (but faster) helpers are added to
++ * include/linux/dcache.h. Try them (in the future).
++ */
++
 +static inline int au_d_hashed_positive(struct dentry *d)
 +{
 +	int err;
@@ -5690,10 +5632,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,518 @@
++++ linux/fs/aufs/debug.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,517 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -5706,8 +5648,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -5879,11 +5820,11 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +	}
 +	/* do not call dget_parent() here */
 +	/* note: access d_xxx without d_lock */
-+	dpri("d%d: %.*s?/%.*s, %s, cnt %d, flags 0x%x\n",
-+	     bindex,
-+	     AuDLNPair(dentry->d_parent), AuDLNPair(dentry),
++	dpri("d%d: %p, %pd2?, %s, cnt %d, flags 0x%x, %shashed\n",
++	     bindex, dentry, dentry,
 +	     dentry->d_sb ? au_sbtype(dentry->d_sb) : "??",
-+	     d_count(dentry), dentry->d_flags);
++	     d_count(dentry), dentry->d_flags,
++	     d_unhashed(dentry) ? "un" : "");
 +	hn = -1;
 +	if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) {
 +		struct au_iinfo *iinfo = au_ii(dentry->d_inode);
@@ -6212,10 +6153,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,249 @@
++++ linux/fs/aufs/debug.h	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,247 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -6228,8 +6169,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -6320,7 +6260,6 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +
 +/* dirty macros for debug print, use with "%.*s" and caution */
 +#define AuLNPair(qstr)		(qstr)->len, (qstr)->name
-+#define AuDLNPair(d)		AuLNPair(&(d)->d_name)
 +
 +/* ---------------------------------------------------------------------- */
 +
@@ -6465,10 +6404,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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,1065 @@
++++ linux/fs/aufs/dentry.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,1081 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -6481,8 +6420,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -6678,8 +6616,8 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	if (unlikely(!au_opt_test(au_mntflags(dentry->d_sb), UDBA_NONE)
 +		     && au_dbstart(dentry) < 0)) {
 +		err = -EIO;
-+		AuIOErr("both of real entry and whiteout found, %.*s, err %d\n",
-+			AuDLNPair(dentry), err);
++		AuIOErr("both of real entry and whiteout found, %pd, err %d\n",
++			dentry, err);
 +	}
 +
 +out_parent:
@@ -6733,8 +6671,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +		goto out;
 +	if (unlikely(h_dentry->d_inode)) {
 +		err = -EIO;
-+		AuIOErr("%.*s should be negative on b%d.\n",
-+			AuDLNPair(h_dentry), bindex);
++		AuIOErr("%pd should be negative on b%d.\n", h_dentry, bindex);
 +		dput(h_dentry);
 +		goto out;
 +	}
@@ -6991,8 +6928,8 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +		/* shrink_dcache_parent(dentry); */
 +		err = au_hide_children(dentry);
 +		if (unlikely(err))
-+			AuIOErr("%.*s, failed hiding children, ignored %d\n",
-+				AuDLNPair(dentry), err);
++			AuIOErr("%pd, failed hiding children, ignored %d\n",
++				dentry, err);
 +	}
 +	au_do_hide(dentry);
 +}
@@ -7223,8 +7160,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	au_update_digen(dentry);
 +out:
 +	if (unlikely(err && !(dentry->d_flags & DCACHE_NFSFS_RENAMED))) {
-+		AuIOErr("failed refreshing %.*s, %d\n",
-+			AuDLNPair(dentry), err);
++		AuIOErr("failed refreshing %pd, %d\n", dentry, err);
 +		AuDbgDentry(dentry);
 +	}
 +	AuTraceErr(err);
@@ -7267,7 +7203,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	int err;
 +	umode_t mode, h_mode;
 +	aufs_bindex_t bindex, btail, bstart, ibs, ibe;
-+	unsigned char plus, unhashed, is_root, h_plus;
++	unsigned char plus, unhashed, is_root, h_plus, h_nfs;
 +	struct inode *h_inode, *h_cached_inode;
 +	struct dentry *h_dentry;
 +	struct qstr *name, *h_name;
@@ -7305,18 +7241,25 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +		if (!h_dentry)
 +			continue;
 +
-+		AuDbg("b%d, %.*s\n", bindex, AuDLNPair(h_dentry));
++		AuDbg("b%d, %pd\n", bindex, h_dentry);
++		h_nfs = !!au_test_nfs(h_dentry->d_sb);
 +		spin_lock(&h_dentry->d_lock);
 +		h_name = &h_dentry->d_name;
 +		if (unlikely(do_udba
 +			     && !is_root
-+			     && (unhashed != !!d_unhashed(h_dentry)
-+				 || name->len != h_name->len
-+				 || memcmp(name->name, h_name->name, name->len))
++			     && ((!h_nfs
++				  && (unhashed != !!d_unhashed(h_dentry)
++				      || name->len != h_name->len
++				      || memcmp(name->name, h_name->name,
++						name->len)))
++				 || (h_nfs
++				     && !(flags & LOOKUP_OPEN)
++				     && (h_dentry->d_flags
++					 & DCACHE_NFSFS_RENAMED)))
 +			    )) {
-+			AuDbg("unhash 0x%x 0x%x, %.*s %.*s\n",
-+				  unhashed, d_unhashed(h_dentry),
-+				  AuDLNPair(dentry), AuDLNPair(h_dentry));
++			AuDbg("unhash 0x%x 0x%x, %pd %pd\n",
++			      unhashed, d_unhashed(h_dentry),
++			      dentry, h_dentry);
 +			spin_unlock(&h_dentry->d_lock);
 +			goto err;
 +		}
@@ -7346,8 +7289,17 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +		if (inode && ibs <= bindex && bindex <= ibe)
 +			h_cached_inode = au_h_iptr(inode, bindex);
 +
-+		if (unlikely(plus != h_plus
-+			     || mode != h_mode
++		if (!h_nfs) {
++			if (unlikely(plus != h_plus))
++				goto err;
++		} else {
++			if (unlikely(!(h_dentry->d_flags & DCACHE_NFSFS_RENAMED)
++				     && !is_root
++				     && !IS_ROOT(h_dentry)
++				     && unhashed != d_unhashed(h_dentry)))
++				goto err;
++		}
++		if (unlikely(mode != h_mode
 +			     || h_cached_inode != h_inode))
 +			goto err;
 +		continue;
@@ -7357,6 +7309,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +		break;
 +	}
 +
++	AuTraceErr(err);
 +	return err;
 +}
 +
@@ -7482,7 +7435,9 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	di_downgrade_lock(dentry, AuLock_IR);
 +
 +	err = -EINVAL;
-+	if (inode && (IS_DEADDIR(inode) || !inode->i_nlink))
++	if (!(flags & LOOKUP_OPEN)
++	    && inode
++	    && (IS_DEADDIR(inode) || !inode->i_nlink))
 +		goto out_inval;
 +
 +	do_udba = !au_opt_test(au_mntflags(sb), UDBA_NONE);
@@ -7500,8 +7455,8 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	err = h_d_revalidate(dentry, inode, flags, do_udba);
 +	if (unlikely(!err && do_udba && au_dbstart(dentry) < 0)) {
 +		err = -EIO;
-+		AuDbg("both of real entry and whiteout found, %.*s, err %d\n",
-+		      AuDLNPair(dentry), err);
++		AuDbg("both of real entry and whiteout found, %p, err %d\n",
++		      dentry, err);
 +	}
 +	goto out_inval;
 +
@@ -7513,7 +7468,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	valid = !err;
 +out:
 +	if (!valid) {
-+		AuDbg("%.*s invalid, %d\n", AuDLNPair(dentry), valid);
++		AuDbg("%pd invalid, %d\n", dentry, valid);
 +		d_drop(dentry);
 +	}
 +	return valid;
@@ -7534,10 +7489,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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,234 @@
++++ linux/fs/aufs/dentry.h	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,233 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -7550,8 +7505,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -7772,10 +7726,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	2013-10-26 16:51:29.579631476 +0200
-@@ -0,0 +1,543 @@
++++ linux/fs/aufs/dinfo.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,542 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -7788,8 +7742,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -8319,10 +8272,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,645 @@
++++ linux/fs/aufs/dir.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,639 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -8335,8 +8288,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -8476,11 +8428,8 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +
 +	FiMustWriteLock(file);
 +
++	err = 0;
 +	dentry = file->f_dentry;
-+	err = au_alive_dir(dentry);
-+	if (unlikely(err))
-+		goto out;
-+
 +	file->f_version = dentry->d_inode->i_version;
 +	bindex = au_dbstart(dentry);
 +	au_set_fbstart(file, bindex);
@@ -8510,7 +8459,6 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +	au_set_fbstart(file, -1);
 +	au_set_fbend_dir(file, -1);
 +
-+out:
 +	return err;
 +}
 +
@@ -8688,8 +8636,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +	struct inode *inode, *h_inode;
 +	struct super_block *sb;
 +
-+	AuDbg("%.*s, ctx{%pf, %llu}\n",
-+	      AuDLNPair(file->f_dentry), ctx->actor, ctx->pos);
++	AuDbg("%pD, ctx{%pf, %llu}\n", file, ctx->actor, ctx->pos);
 +
 +	dentry = file->f_dentry;
 +	inode = dentry->d_inode;
@@ -8968,10 +8915,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	2013-10-26 16:51:29.582964925 +0200
-@@ -0,0 +1,137 @@
++++ linux/fs/aufs/dir.h	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,136 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -8984,8 +8931,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -9109,10 +9055,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	2013-10-26 16:51:29.582964925 +0200
-@@ -0,0 +1,380 @@
++++ linux/fs/aufs/dynop.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,379 @@
 +/*
-+ * Copyright (C) 2010-2013 Junjiro R. Okajima
++ * Copyright (C) 2010-2014 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
@@ -9125,8 +9071,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -9493,10 +9438,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	2013-07-06 13:20:47.740198107 +0200
-@@ -0,0 +1,76 @@
++++ linux/fs/aufs/dynop.h	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,75 @@
 +/*
-+ * Copyright (C) 2010-2013 Junjiro R. Okajima
++ * Copyright (C) 2010-2014 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
@@ -9509,8 +9454,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -9573,10 +9517,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	2013-10-26 16:51:29.582964925 +0200
-@@ -0,0 +1,832 @@
++++ linux/fs/aufs/export.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,831 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -9589,8 +9533,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -9878,9 +9821,9 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +	};
 +
 +	get_fs_root(current->fs, &root);
-+	br_read_lock(&vfsmount_lock);
++	rcu_read_lock();
 +	err = iterate_mounts(au_compare_mnt, &args, root.mnt);
-+	br_read_unlock(&vfsmount_lock);
++	rcu_read_unlock();
 +	path_put(&root);
 +	AuDebugOn(!err);
 +	AuDebugOn(!args.mnt);
@@ -10409,10 +10352,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,725 @@
++++ linux/fs/aufs/file.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,724 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -10425,8 +10368,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -11138,10 +11080,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	2013-10-26 16:51:32.273040419 +0200
++++ linux/fs/aufs/file.h	2014-01-20 20:16:14.736130059 +0100
 @@ -0,0 +1,312 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -11154,8 +11096,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -11204,6 +11145,9 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +		atomic_t			fi_mmapped;
 +	};
 +	struct au_fidir		*fi_hdir;	/* for dir only */
++
++	struct hlist_node	fi_hlist;
++	struct file		*fi_file;	/* very ugly */
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -11440,24 +11384,22 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +static inline void au_vm_prfile_set(struct vm_area_struct *vma,
 +				    struct file *file)
 +{
-+#ifdef CONFIG_AUFS_PROC_MAP
 +	get_file(file);
 +	vma->vm_prfile = file;
 +#ifndef CONFIG_MMU
 +	get_file(file);
 +	vma->vm_region->vm_prfile = file;
 +#endif
-+#endif
 +}
 +
 +#endif /* __KERNEL__ */
 +#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	2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,157 @@
++++ linux/fs/aufs/finfo.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,156 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -11470,8 +11412,7 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -11615,10 +11556,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,726 @@
++++ linux/fs/aufs/f_op.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,718 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -11631,8 +11572,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -11655,11 +11595,8 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +
 +	FiMustWriteLock(file);
 +
++	err = 0;
 +	dentry = file->f_dentry;
-+	err = au_d_alive(dentry);
-+	if (unlikely(err))
-+		goto out;
-+
 +	finfo = au_fi(file);
 +	memset(&finfo->fi_htop, 0, sizeof(finfo->fi_htop));
 +	atomic_set(&finfo->fi_mmapped, 0);
@@ -11671,16 +11608,12 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +		au_set_fbstart(file, bindex);
 +		au_set_h_fptr(file, bindex, h_file);
 +		au_update_figen(file);
-+		if (!(file->f_mode & FMODE_WRITE)) {
-+			lg_local_lock(&files_lglock);
-+			__file_sb_list_add(file, dentry->d_sb);
-+			lg_local_unlock(&files_lglock);
-+		}
++		finfo->fi_file = file;
++		au_sphl_add(&finfo->fi_hlist, &au_sbi(dentry->d_sb)->si_files);
 +		/* todo: necessary? */
 +		/* file->f_ra = h_file->f_ra; */
 +	}
 +
-+out:
 +	return err;
 +}
 +
@@ -11690,9 +11623,8 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +	int err;
 +	struct super_block *sb;
 +
-+	AuDbg("%.*s, f_flags 0x%x, f_mode 0x%x\n",
-+	      AuDLNPair(file->f_dentry), vfsub_file_flags(file),
-+	      file->f_mode);
++	AuDbg("%pD, f_flags 0x%x, f_mode 0x%x\n",
++	      file, vfsub_file_flags(file), file->f_mode);
 +
 +	sb = file->f_dentry->d_sb;
 +	si_read_lock(sb, AuLock_FLUSH);
@@ -11707,6 +11639,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +	aufs_bindex_t bindex;
 +
 +	finfo = au_fi(file);
++	au_sphl_del(&finfo->fi_hlist, &au_sbi(file->f_dentry->d_sb)->si_files);
 +	bindex = finfo->fi_btop;
 +	if (bindex >= 0)
 +		au_set_h_fptr(file, bindex, NULL);
@@ -12246,7 +12179,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +
 +	err = -ENOSYS;
 +	h_file = au_hf_top(file);
-+	if (h_file->f_op && h_file->f_op->aio_fsync) {
++	if (h_file->f_op->aio_fsync) {
 +		struct mutex *h_mtx;
 +
 +		h_mtx = &file_inode(h_file)->i_mutex;
@@ -12289,7 +12222,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +		goto out;
 +
 +	h_file = au_hf_top(file);
-+	if (h_file->f_op && h_file->f_op->fasync)
++	if (h_file->f_op->fasync)
 +		err = h_file->f_op->fasync(fd, h_file, flag);
 +
 +	di_read_unlock(dentry, AuLock_IR);
@@ -12345,10 +12278,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,383 @@
++++ linux/fs/aufs/f_op_sp.c	2014-01-20 20:16:14.736130059 +0100
+@@ -0,0 +1,382 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -12361,8 +12294,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -12610,7 +12542,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 +		.flags	= AuCpup_DTIME
 +	};
 +
-+	AuDbg("%.*s\n", AuDLNPair(dentry));
++	AuDbg("%pd\n", dentry);
 +
 +	di_read_unlock(dentry, AuLock_IR);
 +	di_write_lock_child(dentry);
@@ -12647,7 +12579,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 +		goto out;
 +
 +	dentry = file->f_dentry;
-+	AuDbg("%.*s\n", AuDLNPair(dentry));
++	AuDbg("%pd\n", dentry);
 +
 +	/*
 +	 * try copying-up.
@@ -12732,10 +12664,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,470 @@
++++ linux/fs/aufs/fstype.h	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,469 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -12748,8 +12680,7 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -13206,10 +13137,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,296 @@
++++ linux/fs/aufs/hfsnotify.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,295 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -13222,8 +13153,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -13506,10 +13436,10 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,57 @@
++++ linux/fs/aufs/hfsplus.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,56 @@
 +/*
-+ * Copyright (C) 2010-2013 Junjiro R. Okajima
++ * Copyright (C) 2010-2014 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
@@ -13522,8 +13452,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -13567,10 +13496,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	2013-10-26 16:51:29.582964925 +0200
-@@ -0,0 +1,712 @@
++++ linux/fs/aufs/hnotify.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,710 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -13583,8 +13512,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -13929,8 +13857,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +	if (au_ftest_hnjob(a->flags, MNTPNT)
 +	    && a->dentry
 +	    && d_mountpoint(a->dentry))
-+		pr_warn("mount-point %.*s is removed or renamed\n",
-+			AuDLNPair(a->dentry));
++		pr_warn("mount-point %pd is removed or renamed\n", a->dentry);
 +
 +	return 0;
 +}
@@ -13950,7 +13877,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +	dentry = NULL;
 +	spin_lock(&parent->d_lock);
 +	list_for_each_entry(d, &parent->d_subdirs, d_u.d_child) {
-+		/* AuDbg("%.*s\n", AuDLNPair(d)); */
++		/* AuDbg("%pd\n", d); */
 +		spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED);
 +		dname = &d->d_name;
 +		if (dname->len != nlen || memcmp(dname->name, name, nlen))
@@ -14283,10 +14210,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	2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,276 @@
++++ linux/fs/aufs/iinfo.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,275 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -14299,8 +14226,7 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -14563,10 +14489,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	2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,492 @@
++++ linux/fs/aufs/inode.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,491 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -14579,8 +14505,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -14995,8 +14920,8 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +
 +	if (unlikely(au_test_fs_unique_ino(h_dentry->d_inode)))
 +		AuWarn1("Warning: Un-notified UDBA or repeatedly renamed dir,"
-+			" b%d, %s, %.*s, hi%lu, i%lu.\n",
-+			bstart, au_sbtype(h_dentry->d_sb), AuDLNPair(dentry),
++			" b%d, %s, %pd, hi%lu, i%lu.\n",
++			bstart, au_sbtype(h_dentry->d_sb), dentry,
 +			(unsigned long)h_ino, (unsigned long)ino);
 +	ino = 0;
 +	err = au_xino_write(sb, bstart, h_ino, /*ino*/0);
@@ -15059,10 +14984,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	2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,600 @@
++++ linux/fs/aufs/inode.h	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,599 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -15075,8 +15000,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -15663,10 +15587,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,202 @@
++++ linux/fs/aufs/ioctl.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,201 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -15679,8 +15603,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -15869,10 +15792,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,739 @@
++++ linux/fs/aufs/i_op_add.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,762 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -15885,8 +15808,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -15944,8 +15866,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	wh = au_wh_create(dentry, bwh, wh_dentry->d_parent);
 +	rerr = PTR_ERR(wh);
 +	if (IS_ERR(wh)) {
-+		AuIOErr("%.*s reverting whiteout failed(%d, %d)\n",
-+			AuDLNPair(dentry), err, rerr);
++		AuIOErr("%pd reverting whiteout failed(%d, %d)\n",
++			dentry, err, rerr);
 +		err = -EIO;
 +	} else
 +		dput(wh);
@@ -16032,7 +15954,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	unsigned int udba;
 +	aufs_bindex_t bcpup;
 +
-+	AuDbg("%.*s\n", AuDLNPair(dentry));
++	AuDbg("%pd\n", dentry);
 +
 +	err = au_wr_dir(dentry, src_dentry, wr_dir_args);
 +	bcpup = err;
@@ -16117,7 +16039,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +		struct au_wr_dir_args wr_dir_args;
 +	} *a;
 +
-+	AuDbg("%.*s\n", AuDLNPair(dentry));
++	AuDbg("%pd\n", dentry);
 +	IMustLock(dir);
 +
 +	err = -ENOMEM;
@@ -16167,10 +16089,12 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	/* revert */
 +	if (unlikely(created && err && a->h_path.dentry->d_inode)) {
 +		int rerr;
-+		rerr = vfsub_unlink(h_dir, &a->h_path, /*force*/0);
++		/* no delegation since it is just created */
++		rerr = vfsub_unlink(h_dir, &a->h_path, /*delegated*/NULL,
++				    /*force*/0);
 +		if (rerr) {
-+			AuIOErr("%.*s revert failure(%d, %d)\n",
-+				AuDLNPair(dentry), err, rerr);
++			AuIOErr("%pd revert failure(%d, %d)\n",
++				dentry, err, rerr);
 +			err = -EIO;
 +		}
 +		au_dtime_revert(&a->dt);
@@ -16278,7 +16202,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	unsigned char plink;
 +	aufs_bindex_t bend;
 +	struct dentry *h_src_dentry;
-+	struct inode *h_inode, *inode;
++	struct inode *h_inode, *inode, *delegated;
 +	struct super_block *sb;
 +	struct file *h_file;
 +
@@ -16339,8 +16263,14 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +
 +		}
 +		if (h_src_dentry) {
++			delegated = NULL;
 +			err = vfsub_link(h_src_dentry, au_pinned_h_dir(&a->pin),
-+					 &a->h_path);
++					 &a->h_path, &delegated);
++			if (unlikely(err == -EWOULDBLOCK)) {
++				pr_warn("cannot retry for NFSv4 delegation"
++					" for an internal link\n");
++				iput(delegated);
++			}
 +			dput(h_src_dentry);
 +		} else {
 +			AuIOErr("no dentry found for hi%lu on b%d\n",
@@ -16364,7 +16294,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	struct au_dtime dt;
 +	struct au_link_args *a;
 +	struct dentry *wh_dentry, *h_src_dentry;
-+	struct inode *inode;
++	struct inode *inode, *delegated;
 +	struct super_block *sb;
 +	struct au_wr_dir_args wr_dir_args = {
 +		/* .force_btgt	= -1, */
@@ -16421,9 +16351,16 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +		if (a->bdst < a->bsrc
 +		    /* && h_src_dentry->d_sb != a->h_path.dentry->d_sb */)
 +			err = au_cpup_or_link(src_dentry, dentry, a);
-+		else
++		else {
++			delegated = NULL;
 +			err = vfsub_link(h_src_dentry, au_pinned_h_dir(&a->pin),
-+					 &a->h_path);
++					 &a->h_path, &delegated);
++			if (unlikely(err == -EWOULDBLOCK)) {
++				pr_warn("cannot retry for NFSv4 delegation"
++					" for an internal link\n");
++				iput(delegated);
++			}
++		}
 +		dput(h_src_dentry);
 +	} else {
 +		/*
@@ -16447,10 +16384,18 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +		if (!err) {
 +			h_src_dentry = au_h_dptr(src_dentry, a->bdst);
 +			err = -ENOENT;
-+			if (h_src_dentry && h_src_dentry->d_inode)
++			if (h_src_dentry && h_src_dentry->d_inode) {
++				delegated = NULL;
 +				err = vfsub_link(h_src_dentry,
 +						 au_pinned_h_dir(&a->pin),
-+						 &a->h_path);
++						 &a->h_path, &delegated);
++				if (unlikely(err == -EWOULDBLOCK)) {
++					pr_warn("cannot retry"
++						" for NFSv4 delegation"
++						" for an internal link\n");
++					iput(delegated);
++				}
++			}
 +		}
 +	}
 +	if (unlikely(err))
@@ -16476,10 +16421,11 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	goto out_unpin; /* success */
 +
 +out_revert:
-+	rerr = vfsub_unlink(au_pinned_h_dir(&a->pin), &a->h_path, /*force*/0);
++	/* no delegation since it is just created */
++	rerr = vfsub_unlink(au_pinned_h_dir(&a->pin), &a->h_path,
++			    /*delegated*/NULL, /*force*/0);
 +	if (unlikely(rerr)) {
-+		AuIOErr("%.*s reverting failed(%d, %d)\n",
-+			AuDLNPair(dentry), err, rerr);
++		AuIOErr("%pd reverting failed(%d, %d)\n", dentry, err, rerr);
 +		err = -EIO;
 +	}
 +	au_dtime_revert(&dt);
@@ -16579,8 +16525,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +		rerr = au_diropq_remove(dentry, bindex);
 +		mutex_unlock(h_mtx);
 +		if (rerr) {
-+			AuIOErr("%.*s reverting diropq failed(%d, %d)\n",
-+				AuDLNPair(dentry), err, rerr);
++			AuIOErr("%pd reverting diropq failed(%d, %d)\n",
++				dentry, err, rerr);
 +			err = -EIO;
 +		}
 +	}
@@ -16589,8 +16535,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	AuLabel(revert dir);
 +	rerr = vfsub_rmdir(au_pinned_h_dir(&a->pin), &h_path);
 +	if (rerr) {
-+		AuIOErr("%.*s reverting dir failed(%d, %d)\n",
-+			AuDLNPair(dentry), err, rerr);
++		AuIOErr("%pd reverting dir failed(%d, %d)\n",
++			dentry, err, rerr);
 +		err = -EIO;
 +	}
 +	au_dtime_revert(&a->dt);
@@ -16612,10 +16558,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	2013-10-26 16:51:32.273040419 +0200
-@@ -0,0 +1,1118 @@
++++ linux/fs/aufs/i_op.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,1127 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -16628,8 +16574,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -17356,7 +17301,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +static int aufs_setattr(struct dentry *dentry, struct iattr *ia)
 +{
 +	int err;
-+	struct inode *inode;
++	struct inode *inode, *delegated;
 +	struct super_block *sb;
 +	struct file *file;
 +	struct au_icpup_args *a;
@@ -17436,8 +17381,18 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +		mutex_unlock(&a->h_inode->i_mutex);
 +		err = vfsub_trunc(&a->h_path, ia->ia_size, ia->ia_valid, f);
 +		mutex_lock_nested(&a->h_inode->i_mutex, AuLsc_I_CHILD);
-+	} else
-+		err = vfsub_notify_change(&a->h_path, ia);
++	} else {
++		delegated = NULL;
++		while (1) {
++			err = vfsub_notify_change(&a->h_path, ia, &delegated);
++			if (delegated) {
++				err = break_deleg_wait(&delegated);
++				if (!err)
++					continue;
++			}
++			break;
++		}
++	}
 +	if (!err)
 +		au_cpup_attr_changeable(inode);
 +
@@ -17734,10 +17689,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,502 @@
++++ linux/fs/aufs/i_op_del.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,506 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -17750,8 +17705,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -17978,8 +17932,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +
 +	err = au_whtmp_rmdir(dir, bindex, h_dentry, whlist);
 +	if (unlikely(err)) {
-+		AuIOErr("rmdir %.*s, b%d failed, %d. ignored\n",
-+			AuDLNPair(h_dentry), bindex, err);
++		AuIOErr("rmdir %pd, b%d failed, %d. ignored\n",
++			h_dentry, bindex, err);
 +		err = 0;
 +	}
 +
@@ -18026,8 +17980,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +		return 0;
 +	}
 +
-+	AuIOErr("%.*s reverting whiteout failed(%d, %d)\n",
-+		AuDLNPair(dentry), err, rerr);
++	AuIOErr("%pd reverting whiteout failed(%d, %d)\n", dentry, err, rerr);
 +	return -EIO;
 +}
 +
@@ -18037,7 +17990,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +{
 +	int err;
 +	aufs_bindex_t bwh, bindex, bstart;
-+	struct inode *inode, *h_dir;
++	struct inode *inode, *h_dir, *delegated;
 +	struct dentry *parent, *wh_dentry;
 +	/* to reuduce stack size */
 +	struct {
@@ -18081,7 +18034,13 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +	dget(a->h_path.dentry);
 +	if (bindex == bstart) {
 +		h_dir = au_pinned_h_dir(&a->pin);
-+		err = vfsub_unlink(h_dir, &a->h_path, /*force*/0);
++		delegated = NULL;
++		err = vfsub_unlink(h_dir, &a->h_path, &delegated, /*force*/0);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal unlink\n");
++			iput(delegated);
++		}
 +	} else {
 +		/* dir inode is locked */
 +		h_dir = wh_dentry->d_parent->d_inode;
@@ -18240,10 +18199,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,1009 @@
++++ linux/fs/aufs/i_op_ren.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,1032 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -18256,8 +18215,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -18356,29 +18314,36 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +	au_hn_imtx_unlock(a->src_hinode);
 +	au_set_dbdiropq(a->src_dentry, a->src_bdiropq);
 +	if (rerr)
-+		RevertFailure("remove diropq %.*s", AuDLNPair(a->src_dentry));
++		RevertFailure("remove diropq %pd", a->src_dentry);
 +}
 +
 +static void au_ren_rev_rename(int err, struct au_ren_args *a)
 +{
 +	int rerr;
++	struct inode *delegated;
 +
 +	a->h_path.dentry = vfsub_lkup_one(&a->src_dentry->d_name,
 +					  a->src_h_parent);
 +	rerr = PTR_ERR(a->h_path.dentry);
 +	if (IS_ERR(a->h_path.dentry)) {
-+		RevertFailure("lkup one %.*s", AuDLNPair(a->src_dentry));
++		RevertFailure("lkup one %pd", a->src_dentry);
 +		return;
 +	}
 +
++	delegated = NULL;
 +	rerr = vfsub_rename(a->dst_h_dir,
 +			    au_h_dptr(a->src_dentry, a->btgt),
-+			    a->src_h_dir, &a->h_path);
++			    a->src_h_dir, &a->h_path, &delegated);
++	if (unlikely(rerr == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal rename\n");
++		iput(delegated);
++	}
 +	d_drop(a->h_path.dentry);
 +	dput(a->h_path.dentry);
 +	/* au_set_h_dptr(a->src_dentry, a->btgt, NULL); */
 +	if (rerr)
-+		RevertFailure("rename %.*s", AuDLNPair(a->src_dentry));
++		RevertFailure("rename %pd", a->src_dentry);
 +}
 +
 +static void au_ren_rev_cpup(int err, struct au_ren_args *a)
@@ -18386,22 +18351,25 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +	int rerr;
 +
 +	a->h_path.dentry = a->dst_h_dentry;
-+	rerr = vfsub_unlink(a->dst_h_dir, &a->h_path, /*force*/0);
++	/* no delegation since it is just created */
++	rerr = vfsub_unlink(a->dst_h_dir, &a->h_path, /*delegated*/NULL,
++			    /*force*/0);
 +	au_set_h_dptr(a->src_dentry, a->btgt, NULL);
 +	au_set_dbstart(a->src_dentry, a->src_bstart);
 +	if (rerr)
-+		RevertFailure("unlink %.*s", AuDLNPair(a->dst_h_dentry));
++		RevertFailure("unlink %pd", a->dst_h_dentry);
 +}
 +
 +static void au_ren_rev_whtmp(int err, struct au_ren_args *a)
 +{
 +	int rerr;
++	struct inode *delegated;
 +
 +	a->h_path.dentry = vfsub_lkup_one(&a->dst_dentry->d_name,
 +					  a->dst_h_parent);
 +	rerr = PTR_ERR(a->h_path.dentry);
 +	if (IS_ERR(a->h_path.dentry)) {
-+		RevertFailure("lkup one %.*s", AuDLNPair(a->dst_dentry));
++		RevertFailure("lkup one %pd", a->dst_dentry);
 +		return;
 +	}
 +	if (a->h_path.dentry->d_inode) {
@@ -18410,13 +18378,20 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +		return;
 +	}
 +
-+	rerr = vfsub_rename(a->dst_h_dir, a->h_dst, a->dst_h_dir, &a->h_path);
++	delegated = NULL;
++	rerr = vfsub_rename(a->dst_h_dir, a->h_dst, a->dst_h_dir, &a->h_path,
++			    &delegated);
++	if (unlikely(rerr == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal rename\n");
++		iput(delegated);
++	}
 +	d_drop(a->h_path.dentry);
 +	dput(a->h_path.dentry);
 +	if (!rerr)
 +		au_set_h_dptr(a->dst_dentry, a->btgt, dget(a->h_dst));
 +	else
-+		RevertFailure("rename %.*s", AuDLNPair(a->h_dst));
++		RevertFailure("rename %pd", a->h_dst);
 +}
 +
 +static void au_ren_rev_whsrc(int err, struct au_ren_args *a)
@@ -18427,7 +18402,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +	rerr = au_wh_unlink_dentry(a->src_h_dir, &a->h_path, a->src_dentry);
 +	au_set_dbwh(a->src_dentry, a->src_bwh);
 +	if (rerr)
-+		RevertFailure("unlink %.*s", AuDLNPair(a->src_wh_dentry));
++		RevertFailure("unlink %pd", a->src_wh_dentry);
 +}
 +#undef RevertFailure
 +
@@ -18442,6 +18417,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +{
 +	int err;
 +	struct dentry *d;
++	struct inode *delegated;
 +
 +	d = a->src_dentry;
 +	if (au_dbstart(d) == a->btgt) {
@@ -18450,8 +18426,14 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +		    && au_dbdiropq(d) == a->btgt)
 +			au_fclr_ren(a->flags, DIROPQ);
 +		AuDebugOn(au_dbstart(d) != a->btgt);
++		delegated = NULL;
 +		err = vfsub_rename(a->src_h_dir, au_h_dptr(d, a->btgt),
-+				   a->dst_h_dir, &a->h_path);
++				   a->dst_h_dir, &a->h_path, &delegated);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal rename\n");
++			iput(delegated);
++		}
 +	} else
 +		BUG();
 +
@@ -18475,8 +18457,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +	    || au_test_fs_remote(a->h_dst->d_sb)) {
 +		err = au_whtmp_rmdir(dir, a->btgt, a->h_dst, &a->whlist);
 +		if (unlikely(err))
-+			pr_warn("failed removing whtmp dir %.*s (%d), "
-+				"ignored.\n", AuDLNPair(a->h_dst), err);
++			pr_warn("failed removing whtmp dir %pd (%d), "
++				"ignored.\n", a->h_dst, err);
 +	} else {
 +		au_nhash_wh_free(&a->thargs->whlist);
 +		a->thargs->whlist = a->whlist;
@@ -19049,7 +19031,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +	/* reduce stack space */
 +	struct au_ren_args *a;
 +
-+	AuDbg("%.*s, %.*s\n", AuDLNPair(_src_dentry), AuDLNPair(_dst_dentry));
++	AuDbg("%pd, %pd\n", _src_dentry, _dst_dentry);
 +	IMustLock(_src_dir);
 +	IMustLock(_dst_dir);
 +
@@ -19253,8 +19235,8 @@ 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	2013-07-06 13:20:47.736864659 +0200
-@@ -0,0 +1,202 @@
++++ linux/fs/aufs/Kconfig	2014-01-20 20:16:14.732796615 +0100
+@@ -0,0 +1,179 @@
 +config AUFS_FS
 +	tristate "Aufs (Advanced multi layered unification filesystem) support"
 +	help
@@ -19356,29 +19338,6 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +	shows better performance in most cases.
 +	See detail in aufs.5.
 +
-+config AUFS_PROC_MAP
-+	bool "support for /proc/maps and lsof(1)"
-+	depends on PROC_FS
-+	help
-+	When you issue mmap(2) in aufs, it is actually a direct mmap(2)
-+	call to the file on the branch fs since the file in aufs is
-+	purely virtual. And the file path printed in /proc/maps (and
-+	others) will be the path on the branch fs. In most cases, it
-+	does no harm. But some utilities like lsof(1) may confuse since
-+	the utility or user may expect the file path in aufs to be
-+	printed.
-+	To address this issue, aufs provides a patch which introduces a
-+	new member called vm_prfile into struct vm_are_struct. The patch
-+	is meaningless without enabling this configuration since nobody
-+	sets the new vm_prfile member.
-+	If you don't apply the patch, then enabling this configuration
-+	will cause a compile error.
-+	This approach is fragile since if someone else make some changes
-+	around vm_file, then vm_prfile may not work anymore. As a
-+	workaround such case, aufs provides this configuration. If you
-+	disable it, then lsof(1) may produce incorrect result but the
-+	problem will be gone even if the aufs patch is applied (I hope).
-+
 +config AUFS_SP_IATTR
 +	bool "Respect the attributes (mtime/ctime mainly) of special files"
 +	help
@@ -19459,10 +19418,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,146 @@
++++ linux/fs/aufs/loop.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,145 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -19475,8 +19434,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -19609,10 +19567,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	2013-10-26 16:51:29.586298347 +0200
-@@ -0,0 +1,53 @@
++++ linux/fs/aufs/loop.h	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,52 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -19625,8 +19583,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -19724,7 +19681,7 @@ 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	2013-10-26 16:51:32.273040419 +0200
++++ linux/fs/aufs/Makefile	2014-01-20 20:16:14.732796615 +0100
 @@ -0,0 +1,42 @@
 +
 +include ${src}/magic.mk
@@ -19738,9 +19695,9 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +ccflags-y += -DDEBUG
 +# sparse requires the full pathname
 +ifdef M
-+ccflags-y += -include ${M}/../../include/linux/aufs_type.h
++ccflags-y += -include ${M}/../../include/uapi/linux/aufs_type.h
 +else
-+ccflags-y += -include ${srctree}/include/linux/aufs_type.h
++ccflags-y += -include ${srctree}/include/uapi/linux/aufs_type.h
 +endif
 +
 +obj-$(CONFIG_AUFS_FS) += aufs.o
@@ -19770,10 +19727,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	2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,203 @@
++++ linux/fs/aufs/module.c	2014-01-20 20:16:14.739463504 +0100
+@@ -0,0 +1,202 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -19786,8 +19743,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -19977,10 +19933,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	2013-07-06 13:20:47.750198454 +0200
-@@ -0,0 +1,105 @@
++++ linux/fs/aufs/module.h	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,104 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -19993,8 +19949,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -20086,10 +20041,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/mvdown.c linux/fs/aufs/mvdown.c
 --- /usr/share/empty/fs/aufs/mvdown.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,610 @@
++++ linux/fs/aufs/mvdown.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,627 @@
 +/*
-+ * Copyright (C) 2011-2013 Junjiro R. Okajima
++ * Copyright (C) 2011-2014 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
@@ -20102,8 +20057,11 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++/*
++ * move-down, opposite of copy-up
 + */
 +
 +#include "aufs.h"
@@ -20257,6 +20215,7 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +	int err;
 +	struct path h_path;
 +	struct au_branch *br;
++	struct inode *delegated;
 +
 +	br = au_sbr(a->sb, a->mvd_bdst);
 +	h_path.dentry = au_wh_lkup(a->mvd_h_dst_parent, &a->dentry->d_name, br);
@@ -20269,8 +20228,14 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +	err = 0;
 +	if (h_path.dentry->d_inode) {
 +		h_path.mnt = au_br_mnt(br);
++		delegated = NULL;
 +		err = vfsub_unlink(a->mvd_h_dst_parent->d_inode, &h_path,
-+				   /*force*/0);
++				   &delegated, /*force*/0);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal unlink\n");
++			iput(delegated);
++		}
 +		if (unlikely(err))
 +			AU_MVD_PR(dmsg, "wh_unlink failed\n");
 +	}
@@ -20290,10 +20255,17 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +{
 +	int err;
 +	struct path h_path;
++	struct inode *delegated;
 +
 +	h_path.mnt = au_sbr_mnt(a->sb, a->mvd_bsrc);
 +	h_path.dentry = au_h_dptr(a->dentry, a->mvd_bsrc);
-+	err = vfsub_unlink(a->mvd_h_src_dir, &h_path, /*force*/0);
++	delegated = NULL;
++	err = vfsub_unlink(a->mvd_h_src_dir, &h_path, &delegated, /*force*/0);
++	if (unlikely(err == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal unlink\n");
++		iput(delegated);
++	}
 +	if (unlikely(err))
 +		AU_MVD_PR(dmsg, "unlink failed\n");
 +
@@ -20700,10 +20672,10 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +}
 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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,1704 @@
++++ linux/fs/aufs/opts.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,1701 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -20716,8 +20688,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -21267,9 +21238,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +			break;
 +		case Opt_xino:
 +			u.xino = &opt->xino;
-+			AuDbg("xino {%s %.*s}\n",
-+				  u.xino->path,
-+				  AuDLNPair(u.xino->file->f_dentry));
++			AuDbg("xino {%s %pD}\n", u.xino->path, u.xino->file);
 +			break;
 +		case Opt_trunc_xino:
 +			AuLabel(trunc_xino);
@@ -22408,10 +22377,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,211 @@
++++ linux/fs/aufs/opts.h	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,210 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -22424,8 +22393,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -22623,10 +22591,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,520 @@
++++ linux/fs/aufs/plink.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,532 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -22639,8 +22607,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -22885,7 +22852,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 +	struct path h_path = {
 +		.mnt = au_br_mnt(br)
 +	};
-+	struct inode *h_dir;
++	struct inode *h_dir, *delegated;
 +
 +	h_dir = h_parent->d_inode;
 +	mutex_lock_nested(&h_dir->i_mutex, AuLsc_I_CHILD2);
@@ -22900,14 +22867,27 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 +	/* todo: is it really safe? */
 +	if (h_path.dentry->d_inode
 +	    && h_path.dentry->d_inode != h_dentry->d_inode) {
-+		err = vfsub_unlink(h_dir, &h_path, /*force*/0);
++		delegated = NULL;
++		err = vfsub_unlink(h_dir, &h_path, &delegated, /*force*/0);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal unlink\n");
++			iput(delegated);
++		}
 +		dput(h_path.dentry);
 +		h_path.dentry = NULL;
 +		if (!err)
 +			goto again;
 +	}
-+	if (!err && !h_path.dentry->d_inode)
-+		err = vfsub_link(h_dentry, h_dir, &h_path);
++	if (!err && !h_path.dentry->d_inode) {
++		delegated = NULL;
++		err = vfsub_link(h_dentry, h_dir, &h_path, &delegated);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal link\n");
++			iput(delegated);
++		}
++	}
 +	dput(h_path.dentry);
 +
 +out:
@@ -23147,10 +23127,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,56 @@
++++ linux/fs/aufs/poll.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,55 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -23163,8 +23143,7 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -23194,7 +23173,7 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 +	/* it is not an error if h_file has no operation */
 +	mask = DEFAULT_POLLMASK;
 +	h_file = au_hf_top(file);
-+	if (h_file->f_op && h_file->f_op->poll)
++	if (h_file->f_op->poll)
 +		mask = h_file->f_op->poll(h_file, wait);
 +
 +	di_read_unlock(dentry, AuLock_IR);
@@ -23207,10 +23186,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,170 @@
++++ linux/fs/aufs/procfs.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,169 @@
 +/*
-+ * Copyright (C) 2010-2013 Junjiro R. Okajima
++ * Copyright (C) 2010-2014 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
@@ -23223,8 +23202,7 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -23381,10 +23359,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	2013-10-26 16:51:29.586298347 +0200
-@@ -0,0 +1,389 @@
++++ linux/fs/aufs/rdu.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,388 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -23397,8 +23375,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -23534,7 +23511,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +	arg.end += rdu->sz;
 +
 +	err = -ENOTDIR;
-+	if (unlikely(!file->f_op || !file->f_op->iterate))
++	if (unlikely(!file->f_op->iterate))
 +		goto out;
 +
 +	err = security_file_permission(file, MAY_READ);
@@ -23774,10 +23751,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,188 @@
++++ linux/fs/aufs/rwsem.h	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,187 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -23790,8 +23767,7 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -23966,10 +23942,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,350 @@
++++ linux/fs/aufs/sbinfo.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,351 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -23982,8 +23958,7 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -24087,6 +24062,8 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +	init_waitqueue_head(&sbinfo->si_plink_wq);
 +	spin_lock_init(&sbinfo->si_plink_maint_lock);
 +
++	au_sphl_init(&sbinfo->si_files);
++
 +	/* leave other members for sysaufs and si_mnt. */
 +	sbinfo->si_sb = sb;
 +	sb->s_fs_info = sbinfo;
@@ -24320,10 +24297,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,112 @@
++++ linux/fs/aufs/spl.h	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,111 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -24336,8 +24313,7 @@ diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -24436,10 +24412,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,1002 @@
++++ linux/fs/aufs/super.c	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,1001 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -24452,8 +24428,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -25442,10 +25417,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,568 @@
++++ linux/fs/aufs/super.h	2014-01-20 20:16:14.742796949 +0100
+@@ -0,0 +1,571 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -25458,8 +25433,7 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -25541,7 +25515,8 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +	} au_si_pid;
 +
 +	/*
-+	 * dirty approach to protect sb->sb_inodes and ->s_files from remount.
++	 * dirty approach to protect sb->sb_inodes and ->s_files (gone) from
++	 * remount.
 +	 */
 +	atomic_long_t		si_ninodes, si_nfiles;
 +
@@ -25619,6 +25594,9 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +	spinlock_t		si_plink_maint_lock;
 +	pid_t			si_plink_maint_pid;
 +
++	/* file list */
++	struct au_sphlhead	si_files;
++
 +	/*
 +	 * sysfs and lifetime management.
 +	 * this is not a small structure and it may be a waste of memory in case
@@ -26014,10 +25992,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,105 @@
++++ linux/fs/aufs/sysaufs.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,104 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -26030,8 +26008,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -26123,10 +26100,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,104 @@
++++ linux/fs/aufs/sysaufs.h	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,103 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -26139,8 +26116,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -26231,10 +26207,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,297 @@
++++ linux/fs/aufs/sysfs.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,296 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -26247,8 +26223,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -26532,10 +26507,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	2013-07-06 13:20:47.753531903 +0200
-@@ -0,0 +1,151 @@
++++ linux/fs/aufs/sysrq.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,154 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -26548,8 +26523,7 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -26567,6 +26541,8 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +	char *plevel;
 +	struct au_sbinfo *sbinfo;
 +	struct file *file;
++	struct au_sphlhead *files;
++	struct au_finfo *finfo;
 +
 +	plevel = au_plevel;
 +	au_plevel = KERN_WARNING;
@@ -26622,14 +26598,16 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +	}
 +#endif
 +	pr("files\n");
-+	lg_global_lock(&files_lglock);
-+	do_file_list_for_each_entry(sb, file) {
++	files = &au_sbi(sb)->si_files;
++	spin_lock(&files->spin);
++	hlist_for_each_entry(finfo, &files->head, fi_hlist) {
 +		umode_t mode;
++		file = finfo->fi_file;
 +		mode = file_inode(file)->i_mode;
 +		if (!special_file(mode) || au_special_file(mode))
 +			au_dpri_file(file);
-+	} while_file_list_for_each_entry;
-+	lg_global_unlock(&files_lglock);
++	}
++	spin_unlock(&files->spin);
 +	pr("done\n");
 +
 +#undef pr
@@ -26687,10 +26665,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	2013-10-26 16:51:29.586298347 +0200
-@@ -0,0 +1,888 @@
++++ linux/fs/aufs/vdir.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,887 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -26703,8 +26681,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -27579,10 +27556,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	2013-10-26 16:51:29.586298347 +0200
-@@ -0,0 +1,772 @@
++++ linux/fs/aufs/vfsub.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,782 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -27595,8 +27572,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -27831,7 +27807,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +	return -EMLINK;
 +}
 +
-+int vfsub_link(struct dentry *src_dentry, struct inode *dir, struct path *path)
++int vfsub_link(struct dentry *src_dentry, struct inode *dir, struct path *path,
++	       struct inode **delegated_inode)
 +{
 +	int err;
 +	struct dentry *d;
@@ -27851,7 +27828,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +		goto out;
 +
 +	lockdep_off();
-+	err = vfs_link(src_dentry, dir, path->dentry);
++	err = vfs_link(src_dentry, dir, path->dentry, delegated_inode);
 +	lockdep_on();
 +	if (!err) {
 +		struct path tmp = *path;
@@ -27873,7 +27850,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +}
 +
 +int vfsub_rename(struct inode *src_dir, struct dentry *src_dentry,
-+		 struct inode *dir, struct path *path)
++		 struct inode *dir, struct path *path,
++		 struct inode **delegated_inode)
 +{
 +	int err;
 +	struct path tmp = {
@@ -27893,7 +27871,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +		goto out;
 +
 +	lockdep_off();
-+	err = vfs_rename(src_dir, src_dentry, dir, path->dentry);
++	err = vfs_rename(src_dir, src_dentry, dir, path->dentry,
++			 delegated_inode);
 +	lockdep_on();
 +	if (!err) {
 +		int did;
@@ -28044,7 +28023,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +	int err;
 +
 +	err = 0;
-+	if (file->f_op && file->f_op->flush) {
++	if (file->f_op->flush) {
 +		if (!au_test_nfs(file->f_dentry->d_sb))
 +			err = file->f_op->flush(file, id);
 +		else {
@@ -28063,8 +28042,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +{
 +	int err;
 +
-+	AuDbg("%.*s, ctx{%pf, %llu}\n",
-+	      AuDLNPair(file->f_dentry), ctx->actor, ctx->pos);
++	AuDbg("%pD, ctx{%pf, %llu}\n", file, ctx->actor, ctx->pos);
 +
 +	lockdep_off();
 +	err = iterate_dir(file, ctx);
@@ -28230,6 +28208,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +	int *errp;
 +	struct path *path;
 +	struct iattr *ia;
++	struct inode **delegated_inode;
 +};
 +
 +static void call_notify_change(void *args)
@@ -28242,20 +28221,23 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +
 +	*a->errp = -EPERM;
 +	if (!IS_IMMUTABLE(h_inode) && !IS_APPEND(h_inode)) {
-+		*a->errp = notify_change(a->path->dentry, a->ia);
++		*a->errp = notify_change(a->path->dentry, a->ia,
++					 a->delegated_inode);
 +		if (!*a->errp)
 +			vfsub_update_h_iattr(a->path, /*did*/NULL); /*ignore*/
 +	}
 +	AuTraceErr(*a->errp);
 +}
 +
-+int vfsub_notify_change(struct path *path, struct iattr *ia)
++int vfsub_notify_change(struct path *path, struct iattr *ia,
++			struct inode **delegated_inode)
 +{
 +	int err;
 +	struct notify_change_args args = {
-+		.errp	= &err,
-+		.path	= path,
-+		.ia	= ia
++		.errp			= &err,
++		.path			= path,
++		.ia			= ia,
++		.delegated_inode	= delegated_inode
 +	};
 +
 +	call_notify_change(&args);
@@ -28263,13 +28245,15 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +	return err;
 +}
 +
-+int vfsub_sio_notify_change(struct path *path, struct iattr *ia)
++int vfsub_sio_notify_change(struct path *path, struct iattr *ia,
++			    struct inode **delegated_inode)
 +{
 +	int err, wkq_err;
 +	struct notify_change_args args = {
-+		.errp	= &err,
-+		.path	= path,
-+		.ia	= ia
++		.errp			= &err,
++		.path			= path,
++		.ia			= ia,
++		.delegated_inode	= delegated_inode
 +	};
 +
 +	wkq_err = au_wkq_wait(call_notify_change, &args);
@@ -28285,6 +28269,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +	int *errp;
 +	struct inode *dir;
 +	struct path *path;
++	struct inode **delegated_inode;
 +};
 +
 +static void call_unlink(void *args)
@@ -28310,7 +28295,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +		ihold(h_inode);
 +
 +	lockdep_off();
-+	*a->errp = vfs_unlink(a->dir, d);
++	*a->errp = vfs_unlink(a->dir, d, a->delegated_inode);
 +	lockdep_on();
 +	if (!*a->errp) {
 +		struct path tmp = {
@@ -28332,13 +28317,15 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 + * @dir: must be locked.
 + * @dentry: target dentry.
 + */
-+int vfsub_unlink(struct inode *dir, struct path *path, int force)
++int vfsub_unlink(struct inode *dir, struct path *path,
++		 struct inode **delegated_inode, int force)
 +{
 +	int err;
 +	struct unlink_args args = {
-+		.errp	= &err,
-+		.dir	= dir,
-+		.path	= path
++		.errp			= &err,
++		.dir			= dir,
++		.path			= path,
++		.delegated_inode	= delegated_inode
 +	};
 +
 +	if (!force)
@@ -28355,10 +28342,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,312 @@
++++ linux/fs/aufs/vfsub.h	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,282 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -28371,8 +28358,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -28391,41 +28377,8 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +
 +/* copied from linux/fs/internal.h */
 +/* todo: BAD approach!! */
-+extern struct lglock vfsmount_lock;
 +extern void __mnt_drop_write(struct vfsmount *);
 +extern spinlock_t inode_sb_list_lock;
-+void __file_sb_list_add(struct file *file, struct super_block *sb);
-+
-+/* copied from linux/fs/file_table.c */
-+extern struct lglock files_lglock;
-+#ifdef CONFIG_SMP
-+/*
-+ * These macros iterate all files on all CPUs for a given superblock.
-+ * files_lglock must be held globally.
-+ */
-+#define do_file_list_for_each_entry(__sb, __file)		\
-+{								\
-+	int i;							\
-+	for_each_possible_cpu(i) {				\
-+		struct list_head *list;				\
-+		list = per_cpu_ptr((__sb)->s_files, i);		\
-+		list_for_each_entry((__file), list, f_u.fu_list)
-+
-+#define while_file_list_for_each_entry				\
-+	}							\
-+}
-+
-+#else
-+
-+#define do_file_list_for_each_entry(__sb, __file)		\
-+{								\
-+	struct list_head *list;					\
-+	list = &(sb)->s_files;					\
-+	list_for_each_entry((__file), list, f_u.fu_list)
-+
-+#define while_file_list_for_each_entry				\
-+}
-+#endif
 +
 +/* ---------------------------------------------------------------------- */
 +
@@ -28433,7 +28386,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +/* default MAX_LOCKDEP_SUBCLASSES(8) is not enough */
 +/* reduce? gave up. */
 +enum {
-+	AuLsc_I_Begin = I_MUTEX_QUOTA, /* 4 */
++	AuLsc_I_Begin = I_MUTEX_NONDIR2, /* 4 */
 +	AuLsc_I_PARENT,		/* lower inode, parent first */
 +	AuLsc_I_PARENT2,	/* copyup dirs */
 +	AuLsc_I_PARENT3,	/* copyup wh */
@@ -28532,9 +28485,10 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +		  const char *symname);
 +int vfsub_mknod(struct inode *dir, struct path *path, int mode, dev_t dev);
 +int vfsub_link(struct dentry *src_dentry, struct inode *dir,
-+	       struct path *path);
++	       struct path *path, struct inode **delegated_inode);
 +int vfsub_rename(struct inode *src_hdir, struct dentry *src_dentry,
-+		 struct inode *hdir, struct path *path);
++		 struct inode *hdir, struct path *path,
++		 struct inode **delegated_inode);
 +int vfsub_mkdir(struct inode *dir, struct path *path, int mode);
 +int vfsub_rmdir(struct inode *dir, struct path *path);
 +
@@ -28663,18 +28617,21 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +
 +int vfsub_sio_mkdir(struct inode *dir, struct path *path, int mode);
 +int vfsub_sio_rmdir(struct inode *dir, struct path *path);
-+int vfsub_sio_notify_change(struct path *path, struct iattr *ia);
-+int vfsub_notify_change(struct path *path, struct iattr *ia);
-+int vfsub_unlink(struct inode *dir, struct path *path, int force);
++int vfsub_sio_notify_change(struct path *path, struct iattr *ia,
++			    struct inode **delegated_inode);
++int vfsub_notify_change(struct path *path, struct iattr *ia,
++			struct inode **delegated_inode);
++int vfsub_unlink(struct inode *dir, struct path *path,
++		 struct inode **delegated_inode, int force);
 +
 +#endif /* __KERNEL__ */
 +#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	2013-10-26 16:51:32.276373845 +0200
++++ linux/fs/aufs/wbr_policy.c	2014-01-20 20:16:14.749463838 +0100
 @@ -0,0 +1,756 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -28687,8 +28644,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -28713,13 +28669,14 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +	ia.ia_gid = h_isrc->i_gid;
 +	sbits = !!(ia.ia_mode & (S_ISUID | S_ISGID));
 +	au_cpup_attr_flags(h_path->dentry->d_inode, h_isrc->i_flags);
-+	err = vfsub_sio_notify_change(h_path, &ia);
++	/* no delegation since it is just created */
++	err = vfsub_sio_notify_change(h_path, &ia, /*delegated*/NULL);
 +
 +	/* is this nfs only? */
 +	if (!err && sbits && au_test_nfs(h_path->dentry->d_sb)) {
 +		ia.ia_valid = ATTR_FORCE | ATTR_MODE;
 +		ia.ia_mode = h_isrc->i_mode;
-+		err = vfsub_sio_notify_change(h_path, &ia);
++		err = vfsub_sio_notify_change(h_path, &ia, /*delegated*/NULL);
 +	}
 +
 +	return err;
@@ -28849,8 +28806,8 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +		rerr = au_diropq_remove(dentry, bdst);
 +		mutex_unlock(&h_inode->i_mutex);
 +		if (unlikely(rerr)) {
-+			AuIOErr("failed removing diropq for %.*s b%d (%d)\n",
-+				AuDLNPair(dentry), bdst, rerr);
++			AuIOErr("failed removing diropq for %pd b%d (%d)\n",
++				dentry, bdst, rerr);
 +			err = -EIO;
 +			goto out;
 +		}
@@ -28859,8 +28816,8 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +	if (au_ftest_cpdown(*flags, MADE_DIR)) {
 +		rerr = vfsub_sio_rmdir(au_h_iptr(dir, bdst), &h_path);
 +		if (unlikely(rerr)) {
-+			AuIOErr("failed removing %.*s b%d (%d)\n",
-+				AuDLNPair(dentry), bdst, rerr);
++			AuIOErr("failed removing %pd b%d (%d)\n",
++				dentry, bdst, rerr);
 +			err = -EIO;
 +		}
 +	}
@@ -29431,10 +29388,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	2013-07-06 13:20:47.760198800 +0200
-@@ -0,0 +1,1022 @@
++++ linux/fs/aufs/whout.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,1052 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -29447,8 +29404,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -29522,8 +29478,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +		goto out_wh; /* success */
 +
 +	err = -EIO;
-+	AuIOErr("%.*s Invalid whiteout entry type 0%o.\n",
-+		AuDLNPair(wh_dentry), wh_dentry->d_inode->i_mode);
++	AuIOErr("%pd Invalid whiteout entry type 0%o.\n",
++		wh_dentry, wh_dentry->d_inode->i_mode);
 +
 +out_wh:
 +	dput(wh_dentry);
@@ -29611,7 +29567,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	struct path h_path = {
 +		.mnt = au_br_mnt(br)
 +	};
-+	struct inode *h_dir;
++	struct inode *h_dir, *delegated;
 +	struct dentry *h_parent;
 +
 +	h_parent = h_dentry->d_parent; /* dir inode is locked */
@@ -29624,8 +29580,14 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +		goto out;
 +
 +	/* under the same dir, no need to lock_rename() */
-+	err = vfsub_rename(h_dir, h_dentry, h_dir, &h_path);
++	delegated = NULL;
++	err = vfsub_rename(h_dir, h_dentry, h_dir, &h_path, &delegated);
 +	AuTraceErr(err);
++	if (unlikely(err == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal rename\n");
++		iput(delegated);
++	}
 +	dput(h_path.dentry);
 +
 +out:
@@ -29640,7 +29602,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +
 +static int do_unlink_wh(struct inode *h_dir, struct path *h_path)
 +{
-+	int force;
++	int err, force;
++	struct inode *delegated;
 +
 +	/*
 +	 * forces superio when the dir has a sticky bit.
@@ -29648,7 +29611,14 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	 */
 +	force = (h_dir->i_mode & S_ISVTX)
 +		&& !uid_eq(current_fsuid(), h_path->dentry->d_inode->i_uid);
-+	return vfsub_unlink(h_dir, h_path, force);
++	delegated = NULL;
++	err = vfsub_unlink(h_dir, h_path, &delegated, force);
++	if (unlikely(err == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal unlink\n");
++		iput(delegated);
++	}
++	return err;
 +}
 +
 +int au_wh_unlink_dentry(struct inode *h_dir, struct path *h_path,
@@ -29694,17 +29664,25 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +			const int isdir)
 +{
 +	int err;
++	struct inode *delegated;
 +
 +	if (!whpath->dentry->d_inode)
 +		return;
 +
 +	if (isdir)
 +		err = vfsub_rmdir(h_dir, whpath);
-+	else
-+		err = vfsub_unlink(h_dir, whpath, /*force*/0);
++	else {
++		delegated = NULL;
++		err = vfsub_unlink(h_dir, whpath, &delegated, /*force*/0);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal unlink\n");
++			iput(delegated);
++		}
++	}
 +	if (unlikely(err))
-+		pr_warn("failed removing %.*s (%d), ignored.\n",
-+			AuDLNPair(whpath->dentry), err);
++		pr_warn("failed removing %pd (%d), ignored.\n",
++			whpath->dentry, err);
 +}
 +
 +static int test_linkable(struct dentry *h_root)
@@ -29714,8 +29692,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	if (h_dir->i_op->link)
 +		return 0;
 +
-+	pr_err("%.*s (%s) doesn't support link(2), use noplink and rw+nolwh\n",
-+	       AuDLNPair(h_root), au_sbtype(h_root->d_sb));
++	pr_err("%pd (%s) doesn't support link(2), use noplink and rw+nolwh\n",
++	       h_root, au_sbtype(h_root->d_sb));
 +	return -ENOSYS;
 +}
 +
@@ -29734,7 +29712,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	} else if (S_ISDIR(path->dentry->d_inode->i_mode))
 +		err = 0;
 +	else
-+		pr_err("unknown %.*s exists\n", AuDLNPair(path->dentry));
++		pr_err("unknown %pd exists\n", path->dentry);
 +
 +	return err;
 +}
@@ -29829,8 +29807,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	} else if (S_ISREG(base[AuBrWh_BASE].dentry->d_inode->i_mode))
 +		err = 0;
 +	else
-+		pr_err("unknown %.*s/%.*s exists\n",
-+		       AuDLNPair(h_root), AuDLNPair(base[AuBrWh_BASE].dentry));
++		pr_err("unknown %pd2 exists\n", base[AuBrWh_BASE].dentry);
 +	if (unlikely(err))
 +		goto out;
 +
@@ -29933,8 +29910,8 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	goto out; /* success */
 +
 +out_err:
-+	pr_err("an error(%d) on the writable branch %.*s(%s)\n",
-+	       err, AuDLNPair(h_root), au_sbtype(h_root->d_sb));
++	pr_err("an error(%d) on the writable branch %pd(%s)\n",
++	       err, h_root, au_sbtype(h_root->d_sb));
 +out:
 +	for (i = 0; i < AuBrWh_Last; i++)
 +		dput(base[i].dentry);
@@ -29960,7 +29937,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	struct path h_path;
 +	struct reinit_br_wh *a = arg;
 +	struct au_wbr *wbr;
-+	struct inode *dir;
++	struct inode *dir, *delegated;
 +	struct dentry *h_root;
 +	struct au_hinode *hdir;
 +
@@ -29987,10 +29964,16 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	if (!err) {
 +		h_path.dentry = wbr->wbr_whbase;
 +		h_path.mnt = au_br_mnt(a->br);
-+		err = vfsub_unlink(hdir->hi_inode, &h_path, /*force*/0);
++		delegated = NULL;
++		err = vfsub_unlink(hdir->hi_inode, &h_path, &delegated,
++				   /*force*/0);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal unlink\n");
++			iput(delegated);
++		}
 +	} else {
-+		pr_warn("%.*s is moved, ignored\n",
-+			AuDLNPair(wbr->wbr_whbase));
++		pr_warn("%pd is moved, ignored\n", wbr->wbr_whbase);
 +		err = 0;
 +	}
 +	dput(wbr->wbr_whbase);
@@ -30060,7 +30043,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	struct au_branch *br;
 +	struct au_wbr *wbr;
 +	struct dentry *h_parent;
-+	struct inode *h_dir;
++	struct inode *h_dir, *delegated;
 +
 +	h_parent = wh->d_parent; /* dir inode is locked */
 +	h_dir = h_parent->d_inode;
@@ -30071,7 +30054,13 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	wbr = br->br_wbr;
 +	wbr_wh_read_lock(wbr);
 +	if (wbr->wbr_whbase) {
-+		err = vfsub_link(wbr->wbr_whbase, h_dir, &h_path);
++		delegated = NULL;
++		err = vfsub_link(wbr->wbr_whbase, h_dir, &h_path, &delegated);
++		if (unlikely(err == -EWOULDBLOCK)) {
++			pr_warn("cannot retry for NFSv4 delegation"
++				" for an internal link\n");
++			iput(delegated);
++		}
 +		if (!err || err != -EMLINK)
 +			goto out;
 +
@@ -30380,8 +30369,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +		return 0; /* success */
 +	}
 +
-+	pr_warn("failed removing %.*s(%d), ignored\n",
-+		AuDLNPair(wh_dentry), err);
++	pr_warn("failed removing %pd(%d), ignored\n", wh_dentry, err);
 +	return err;
 +}
 +
@@ -30450,17 +30438,16 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	args->wh_dentry = dget(wh_dentry);
 +	wkq_err = au_wkq_nowait(call_rmdir_whtmp, args, sb, /*flags*/0);
 +	if (unlikely(wkq_err)) {
-+		pr_warn("rmdir error %.*s (%d), ignored\n",
-+			AuDLNPair(wh_dentry), wkq_err);
++		pr_warn("rmdir error %pd (%d), ignored\n", wh_dentry, wkq_err);
 +		au_whtmp_rmdir_free(args);
 +	}
 +}
 diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 --- /usr/share/empty/fs/aufs/whout.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h	2013-07-06 13:20:47.760198800 +0200
-@@ -0,0 +1,87 @@
++++ linux/fs/aufs/whout.h	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,86 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -30473,8 +30460,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -30548,10 +30534,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,213 @@
++++ linux/fs/aufs/wkq.c	2014-01-20 20:16:14.749463838 +0100
+@@ -0,0 +1,212 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -30564,8 +30550,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -30765,10 +30750,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	2013-07-06 13:20:47.760198800 +0200
-@@ -0,0 +1,92 @@
++++ linux/fs/aufs/wkq.h	2014-01-20 20:16:14.752797282 +0100
+@@ -0,0 +1,91 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -30781,8 +30766,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -30861,10 +30845,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	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,1312 @@
++++ linux/fs/aufs/xino.c	2014-01-20 20:16:14.752797282 +0100
+@@ -0,0 +1,1314 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -30877,8 +30861,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +/*
@@ -31003,7 +30986,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +{
 +	struct file *file;
 +	struct dentry *base, *parent;
-+	struct inode *dir;
++	struct inode *dir, *delegated;
 +	struct qstr *name;
 +	struct path path;
 +	int err;
@@ -31018,8 +31001,8 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	path.dentry = vfsub_lookup_one_len(name->name, parent, name->len);
 +	if (IS_ERR(path.dentry)) {
 +		file = (void *)path.dentry;
-+		pr_err("%.*s lookup err %ld\n",
-+		       AuLNPair(name), PTR_ERR(path.dentry));
++		pr_err("%pd lookup err %ld\n",
++		       base, PTR_ERR(path.dentry));
 +		goto out;
 +	}
 +
@@ -31027,7 +31010,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	err = vfs_create(dir, path.dentry, S_IRUGO | S_IWUGO, NULL);
 +	if (unlikely(err)) {
 +		file = ERR_PTR(err);
-+		pr_err("%.*s create err %d\n", AuLNPair(name), err);
++		pr_err("%pd create err %d\n", base, err);
 +		goto out_dput;
 +	}
 +
@@ -31036,13 +31019,19 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +				 O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE
 +				 /* | __FMODE_NONOTIFY */);
 +	if (IS_ERR(file)) {
-+		pr_err("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file));
++		pr_err("%pd open err %ld\n", base, PTR_ERR(file));
 +		goto out_dput;
 +	}
 +
-+	err = vfsub_unlink(dir, &file->f_path, /*force*/0);
++	delegated = NULL;
++	err = vfsub_unlink(dir, &file->f_path, &delegated, /*force*/0);
++	if (unlikely(err == -EWOULDBLOCK)) {
++		pr_warn("cannot retry for NFSv4 delegation"
++			" for an internal unlink\n");
++		iput(delegated);
++	}
 +	if (unlikely(err)) {
-+		pr_err("%.*s unlink err %d\n", AuLNPair(name), err);
++		pr_err("%pd unlink err %d\n", base, err);
 +		goto out_fput;
 +	}
 +
@@ -31050,7 +31039,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +		/* no one can touch copy_src xino */
 +		err = au_copy_file(file, copy_src, vfsub_f_size_read(copy_src));
 +		if (unlikely(err)) {
-+			pr_err("%.*s copy err %d\n", AuLNPair(name), err);
++			pr_err("%pd copy err %d\n", base, err);
 +			goto out_fput;
 +		}
 +	}
@@ -31611,7 +31600,8 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	h_dir = h_parent->d_inode;
 +	mutex_lock_nested(&h_dir->i_mutex, AuLsc_I_PARENT);
 +	/* mnt_want_write() is unnecessary here */
-+	err = vfsub_unlink(h_dir, &file->f_path, /*force*/0);
++	/* no delegation since it is just created */
++	err = vfsub_unlink(h_dir, &file->f_path, /*delegated*/NULL, /*force*/0);
 +	mutex_unlock(&h_dir->i_mutex);
 +	dput(h_parent);
 +	if (unlikely(err)) {
@@ -31853,12 +31843,10 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +{
 +	const struct file_operations *fop = h_file->f_op;
 +
-+	if (fop) {
-+		if (fop->read)
-+			return fop->read;
-+		if (fop->aio_read)
-+			return do_sync_read;
-+	}
++	if (fop->read)
++		return fop->read;
++	if (fop->aio_read)
++		return do_sync_read;
 +	return ERR_PTR(-ENOSYS);
 +}
 +
@@ -31866,12 +31854,10 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +{
 +	const struct file_operations *fop = h_file->f_op;
 +
-+	if (fop) {
-+		if (fop->write)
-+			return fop->write;
-+		if (fop->aio_write)
-+			return do_sync_write;
-+	}
++	if (fop->write)
++		return fop->write;
++	if (fop->aio_write)
++		return do_sync_write;
 +	return ERR_PTR(-ENOSYS);
 +}
 +
@@ -32175,35 +32161,12 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +out:
 +	return err;
 +}
-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	2013-07-06 13:20:47.760198800 +0200
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (C) 2012-2013 Junjiro R. Okajima
-+ *
-+ * This program, aufs is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-+ */
-+
-+#include <uapi/linux/aufs_type.h>
 diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
 --- /usr/share/empty/include/uapi/linux/aufs_type.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h	2013-10-26 16:51:32.276373845 +0200
-@@ -0,0 +1,282 @@
++++ linux/include/uapi/linux/aufs_type.h	2014-01-20 20:16:14.752797282 +0100
+@@ -0,0 +1,281 @@
 +/*
-+ * Copyright (C) 2005-2013 Junjiro R. Okajima
++ * Copyright (C) 2005-2014 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
@@ -32216,8 +32179,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + */
 +
 +#ifndef __AUFS_TYPE_H__
@@ -32244,7 +32206,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION	"3.x-rcN-20131014"
++#define AUFS_VERSION	"3.x-rcN-20140120"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -32484,3 +32446,4 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +				      struct aufs_mvdown)
 +
<Skipped 680 lines>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/523b37e3f08a25065f4facd124e137685c2da2dc



More information about the pld-cvs-commit mailing list