[packages/kernel] - initial 3.8 update (builds --with rescuecd --without imq for now)

arekm arekm at pld-linux.org
Tue Feb 19 09:16:41 CET 2013


commit 1716fcea230da35a030c78a79a53d6d39d21d655
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Feb 19 09:16:35 2013 +0100

    - initial 3.8 update (builds --with rescuecd --without imq for now)

 kernel-aufs3.patch           | 424 ++++++++++++++++------------
 kernel-imq.patch             |   4 +-
 kernel-layer7.patch          |   6 +-
 kernel-small_fixes.patch     | 649 -------------------------------------------
 kernel-virtio-gl-accel.patch |   4 +-
 kernel.spec                  |  10 +-
 6 files changed, 256 insertions(+), 841 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 97d035f..565c030 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -66,9 +66,9 @@
 %define		have_pcmcia	0
 %endif
 
-%define		rel		1
-%define		basever		3.7
-%define		postver		.9
+%define		rel		0.1
+%define		basever		3.8
+%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)
@@ -108,7 +108,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:	21223369d682bcf44bcdfe1521095983
+# Source0-md5:	1c738edfc54e7c65faeb90c436104e2f
 %if "%{postver}" != ".0"
 Patch0:		http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
 # Patch0-md5:	8d176cf61afaafa3c621833a8f8d2c62
@@ -209,7 +209,7 @@ Patch122:	ovl13-overlayfs-copy-up-i_uid-i_gid-from-the-underlying-in.patch
 # Patch creation:
 # git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git
 # cd aufs3-standalone
-# git checkout -b aufs3.7 origin/aufs3.7
+# git checkout -b aufs3.8 origin/aufs3.8
 # cat aufs3-kbuild.patch aufs3-base.patch aufs3-standalone.patch > ~/rpm/packages/kernel/kernel-aufs3.patch
 # mkdir linux
 # cp -a Documentation fs include linux
diff --git a/kernel-aufs3.patch b/kernel-aufs3.patch
index 64d4a4b..548ca11 100644
--- a/kernel-aufs3.patch
+++ b/kernel-aufs3.patch
@@ -1,30 +1,30 @@
-aufs3.7 kbuild patch
+aufs3.x-rcN kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
-index f95ae3a..6d8a9a5 100644
+index 780725a..d460c05 100644
 --- a/fs/Kconfig
 +++ b/fs/Kconfig
-@@ -220,6 +220,7 @@ source "fs/pstore/Kconfig"
- source "fs/sysv/Kconfig"
+@@ -211,6 +211,7 @@ source "fs/sysv/Kconfig"
  source "fs/ufs/Kconfig"
  source "fs/exofs/Kconfig"
+ source "fs/f2fs/Kconfig"
 +source "fs/aufs/Kconfig"
  
  endif # MISC_FILESYSTEMS
  
 diff --git a/fs/Makefile b/fs/Makefile
-index 1d7af79..06db6eb 100644
+index 9d53192..e70f08f 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
-@@ -126,3 +126,4 @@ obj-$(CONFIG_GFS2_FS)           += gfs2/
+@@ -127,3 +127,4 @@ obj-$(CONFIG_F2FS_FS)		+= f2fs/
  obj-y				+= exofs/ # Multiple modules
  obj-$(CONFIG_CEPH_FS)		+= ceph/
  obj-$(CONFIG_PSTORE)		+= pstore/
 +obj-$(CONFIG_AUFS_FS)           += aufs/
-aufs3.7 base patch
+aufs3.x-rcN base patch
 
 diff --git a/fs/file_table.c b/fs/file_table.c
-index a72bf9d..dac6792 100644
+index de9e965..e73287a 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -36,7 +36,7 @@ struct files_stat_struct files_stat = {
@@ -37,7 +37,7 @@ index a72bf9d..dac6792 100644
  /* SLAB cache for file structures */
  static struct kmem_cache *filp_cachep __read_mostly;
 diff --git a/fs/inode.c b/fs/inode.c
-index 64999f1..ad73fc3 100644
+index 14084b7..ece87ed 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -1503,7 +1503,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
@@ -50,10 +50,10 @@ index 64999f1..ad73fc3 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 13e5b47..f185c6c 100644
+index 6909d89..020c7bc 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1093,8 +1093,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1092,8 +1092,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
  /*
   * Attempt to initiate a splice from pipe to file.
   */
@@ -64,7 +64,7 @@ index 13e5b47..f185c6c 100644
  {
  	ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
  				loff_t *, size_t, unsigned int);
-@@ -1121,9 +1121,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1120,9 +1120,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  /*
   * Attempt to initiate a splice from a file to a pipe.
   */
@@ -78,10 +78,10 @@ index 13e5b47..f185c6c 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 75fe9a1..70a766ae 100644
+index 7617ee0..1a39c33 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -2553,6 +2553,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
+@@ -2551,6 +2551,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);
  
@@ -104,10 +104,10 @@ index 09a545a..1ac5727 100644
 +			 struct pipe_inode_info *pipe, size_t len,
 +			 unsigned int flags);
  #endif
-aufs3.7 standalone patch
+aufs3.x-rcN standalone patch
 
 diff --git a/fs/file_table.c b/fs/file_table.c
-index dac6792..e3f2c15 100644
+index e73287a..b33aebe 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -37,6 +37,7 @@ struct files_stat_struct files_stat = {
@@ -128,7 +128,7 @@ index dac6792..e3f2c15 100644
  
  /*
 diff --git a/fs/inode.c b/fs/inode.c
-index ad73fc3..108ff2b 100644
+index ece87ed..38f7bc8 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -56,6 +56,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@@ -148,10 +148,10 @@ index ad73fc3..108ff2b 100644
  /**
   *	touch_atime	-	update the access time
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 2496062..3e66a90 100644
+index 55605c5..aed7607 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -50,6 +50,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
+@@ -52,6 +52,7 @@ EXPORT_SYMBOL_GPL(fs_kobj);
   * tree or hash is modified or when a vfsmount structure is modified.
   */
  DEFINE_BRLOCK(vfsmount_lock);
@@ -159,7 +159,7 @@ index 2496062..3e66a90 100644
  
  static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
  {
-@@ -1401,6 +1402,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1424,6 +1425,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
  	}
  	return 0;
  }
@@ -168,7 +168,7 @@ index 2496062..3e66a90 100644
  static void cleanup_group_ids(struct mount *mnt, struct mount *end)
  {
 diff --git a/fs/notify/group.c b/fs/notify/group.c
-index 63fc294..6f4adca 100644
+index bd2625b..2ff2a0f 100644
 --- a/fs/notify/group.c
 +++ b/fs/notify/group.c
 @@ -22,6 +22,7 @@
@@ -179,48 +179,59 @@ index 63fc294..6f4adca 100644
  
  #include <linux/fsnotify_backend.h>
  #include "fsnotify.h"
-@@ -70,6 +71,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
+@@ -65,6 +66,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
+ {
+ 	atomic_inc(&group->refcnt);
+ }
++EXPORT_SYMBOL(fsnotify_get_group);
+ 
+ /*
+  * Drop a reference to a group.  Free it if it's through.
+@@ -74,6 +76,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
  	if (atomic_dec_and_test(&group->refcnt))
- 		fsnotify_destroy_group(group);
+ 		fsnotify_final_destroy_group(group);
  }
 +EXPORT_SYMBOL(fsnotify_put_group);
  
  /*
   * Create a new fsnotify_group and hold a reference for the group returned.
-@@ -102,3 +104,4 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
+@@ -102,6 +105,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
  
  	return group;
  }
 +EXPORT_SYMBOL(fsnotify_alloc_group);
+ 
+ int fsnotify_fasync(int fd, struct file *file, int on)
+ {
 diff --git a/fs/notify/mark.c b/fs/notify/mark.c
-index f104d56..54f36db 100644
+index fc6b49b..a6bb87d 100644
 --- a/fs/notify/mark.c
 +++ b/fs/notify/mark.c
-@@ -112,6 +112,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
- 	if (atomic_dec_and_test(&mark->refcnt))
+@@ -115,6 +115,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
  		mark->free_mark(mark);
+ 	}
  }
 +EXPORT_SYMBOL(fsnotify_put_mark);
  
  /*
   * Any time a mark is getting freed we end up here.
-@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
- 	if (unlikely(atomic_dec_and_test(&group->num_marks)))
- 		fsnotify_final_destroy_group(group);
+@@ -197,6 +198,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
+ 	fsnotify_destroy_mark_locked(mark, group);
+ 	mutex_unlock(&group->mark_mutex);
  }
 +EXPORT_SYMBOL(fsnotify_destroy_mark);
  
  void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
  {
-@@ -278,6 +280,7 @@ err:
+@@ -281,6 +283,7 @@ err:
  
  	return ret;
  }
 +EXPORT_SYMBOL(fsnotify_add_mark);
  
- /*
-  * clear any marks in a group in which mark->flags & flags is true
-@@ -333,6 +336,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
+ int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
+ 		      struct inode *inode, struct vfsmount *mnt, int allow_dups)
+@@ -342,6 +345,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
  	atomic_set(&mark->refcnt, 1);
  	mark->free_mark = free_mark;
  }
@@ -229,7 +240,7 @@ index f104d56..54f36db 100644
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index 59071f5..7e4c856 100644
+index 9b33c0c..e3365035 100644
 --- a/fs/open.c
 +++ b/fs/open.c
 @@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -238,13 +249,13 @@ index 59071f5..7e4c856 100644
  }
 +EXPORT_SYMBOL(do_truncate);
  
- static long do_sys_truncate(const char __user *pathname, loff_t length)
+ long vfs_truncate(struct path *path, loff_t length)
  {
 diff --git a/fs/splice.c b/fs/splice.c
-index f185c6c..f3d89da 100644
+index 020c7bc..a622ade 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -1117,6 +1117,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1116,6 +1116,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  
  	return splice_write(pipe, out, ppos, len, flags);
  }
@@ -252,7 +263,7 @@ index f185c6c..f3d89da 100644
  
  /*
   * Attempt to initiate a splice from a file to a pipe.
-@@ -1143,6 +1144,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1142,6 +1143,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  
  	return splice_read(in, ppos, pipe, len, flags);
  }
@@ -261,10 +272,10 @@ index f185c6c..f3d89da 100644
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/security/commoncap.c b/security/commoncap.c
-index 6dbae46..9f4f29a 100644
+index 7ee08c7..176edf1 100644
 --- a/security/commoncap.c
 +++ b/security/commoncap.c
-@@ -979,9 +979,11 @@ int cap_mmap_addr(unsigned long addr)
+@@ -988,9 +988,11 @@ int cap_mmap_addr(unsigned long addr)
  	}
  	return ret;
  }
@@ -277,7 +288,7 @@ index 6dbae46..9f4f29a 100644
  }
 +EXPORT_SYMBOL(cap_mmap_file);
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index b08d20c..a90420b 100644
+index d794abc..a20f167 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
 @@ -7,6 +7,7 @@
@@ -288,7 +299,7 @@ index b08d20c..a90420b 100644
  #include <linux/list.h>
  #include <linux/uaccess.h>
  #include <linux/seq_file.h>
-@@ -617,6 +618,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
+@@ -631,6 +632,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
  	return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
  			access);
  }
@@ -297,7 +308,7 @@ index b08d20c..a90420b 100644
  int devcgroup_inode_mknod(int mode, dev_t dev)
  {
 diff --git a/security/security.c b/security/security.c
-index 8dcd4ae..6efe561 100644
+index 7b88c6a..5d00a30 100644
 --- a/security/security.c
 +++ b/security/security.c
 @@ -396,6 +396,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
@@ -451,7 +462,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
 +		will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/01intro.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,162 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -617,7 +628,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +about it. But currently I have implemented it in kernel space.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/02struct.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,226 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -847,7 +858,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +dir, aufs reverts it after copy-up.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,106 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -957,7 +968,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
 +   by over-mounting something (or another method).
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/04branch.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,76 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1037,7 +1048,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
 +    same named entry on the upper branch.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,65 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1106,7 +1117,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx
 +  copyup policy.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,47 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1157,7 +1168,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
 +switching the approach.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/07export.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,59 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1220,7 +1231,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
 +  lookup_one_len(), vfs_getattr(), encode_fh() and others.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,53 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1277,7 +1288,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
 +initramfs will use it to replace the old one at the next boot.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,47 @@
 +
 +# Copyright (C) 2010-2013 Junjiro R. Okajima
@@ -1328,7 +1339,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin
 +vm_operations_struct for regular files only.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt linux/Documentation/filesystems/aufs/design/99plan.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/99plan.txt	2013-01-11 19:46:12.632614518 +0100
++++ linux/Documentation/filesystems/aufs/design/99plan.txt	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,96 @@
 +
 +# Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1428,7 +1439,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/99plan.txt linu
 +Otherwise from /new.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
 --- /usr/share/empty/Documentation/filesystems/aufs/README	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README	2013-01-11 19:46:28.699667650 +0100
++++ linux/Documentation/filesystems/aufs/README	2013-02-19 08:40:03.943559493 +0100
 @@ -0,0 +1,333 @@
 +
 +Aufs3 -- advanced multi layered unification filesystem version 3.x
@@ -1765,7 +1776,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +# End: ;
 diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 --- /usr/share/empty/fs/aufs/aufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/aufs.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,60 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -1829,7 +1840,7 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 +#endif /* __AUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 --- /usr/share/empty/fs/aufs/branch.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/branch.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,1172 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -3005,8 +3016,8 @@ 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-01-11 19:46:12.635947932 +0100
-@@ -0,0 +1,230 @@
++++ linux/fs/aufs/branch.h	2013-02-19 08:40:03.946892891 +0100
+@@ -0,0 +1,236 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -3070,6 +3081,13 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +/* ext2 has 3 types of operations at least, ext3 has 4 */
 +#define AuBrDynOp (AuDyLast * 4)
 +
++#ifdef CONFIG_AUFS_HFSNOTIFY
++/* support for asynchronous destruction */
++struct au_br_hfsnotify {
++	struct fsnotify_group	*hfsn_group;
++};
++#endif
++
 +/* protected by superblock rwsem */
 +struct au_branch {
 +	struct au_xino_file	br_xino;
@@ -3089,8 +3107,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +	atomic_t		br_xino_running;
 +
 +#ifdef CONFIG_AUFS_HFSNOTIFY
-+	struct fsnotify_group	*br_hfsn_group;
-+	struct fsnotify_ops	br_hfsn_ops;
++	struct au_br_hfsnotify	*br_hfsn;
 +#endif
 +
 +#ifdef CONFIG_SYSFS
@@ -3281,7 +3298,7 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 +-include ${srctree}/${src}/conf_priv.mk
 diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 --- /usr/share/empty/fs/aufs/cpup.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c	2013-01-11 19:46:28.699667650 +0100
++++ linux/fs/aufs/cpup.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,1085 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -4370,7 +4387,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +}
 diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 --- /usr/share/empty/fs/aufs/cpup.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/cpup.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,81 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -4455,7 +4472,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 +#endif /* __AUFS_CPUP_H__ */
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 --- /usr/share/empty/fs/aufs/dbgaufs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dbgaufs.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,334 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -4793,7 +4810,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 --- /usr/share/empty/fs/aufs/dbgaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dbgaufs.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,49 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -4846,7 +4863,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +#endif /* __DBGAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 --- /usr/share/empty/fs/aufs/dcsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dcsub.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,243 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -5093,7 +5110,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 --- /usr/share/empty/fs/aufs/dcsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dcsub.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,94 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -5191,7 +5208,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +#endif /* __AUFS_DCSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 --- /usr/share/empty/fs/aufs/debug.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/debug.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,490 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -5685,7 +5702,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +}
 diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 --- /usr/share/empty/fs/aufs/debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/debug.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,242 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -5931,7 +5948,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +#endif /* __AUFS_DEBUG_H__ */
 diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 --- /usr/share/empty/fs/aufs/dentry.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dentry.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,1060 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -6995,7 +7012,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 --- /usr/share/empty/fs/aufs/dentry.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dentry.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,234 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -7233,7 +7250,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#endif /* __AUFS_DENTRY_H__ */
 diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 --- /usr/share/empty/fs/aufs/dinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dinfo.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,543 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -7780,7 +7797,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 --- /usr/share/empty/fs/aufs/dir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dir.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,633 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -8417,7 +8434,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 --- /usr/share/empty/fs/aufs/dir.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dir.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,137 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -8558,7 +8575,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#endif /* __AUFS_DIR_H__ */
 diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 --- /usr/share/empty/fs/aufs/dynop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dynop.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,379 @@
 +/*
 + * Copyright (C) 2010-2013 Junjiro R. Okajima
@@ -8941,7 +8958,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 --- /usr/share/empty/fs/aufs/dynop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/dynop.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,76 @@
 +/*
 + * Copyright (C) 2010-2013 Junjiro R. Okajima
@@ -9021,8 +9038,8 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 +#endif /* __AUFS_DYNOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 --- /usr/share/empty/fs/aufs/export.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c	2013-01-11 19:46:28.699667650 +0100
-@@ -0,0 +1,811 @@
++++ linux/fs/aufs/export.c	2013-02-19 08:40:03.946892891 +0100
+@@ -0,0 +1,812 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -9405,7 +9422,8 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +	dentry = ERR_PTR(err);
 +	if (unlikely(err))
 +		goto out_name;
-+	dentry = ERR_PTR(-ENOENT);
++	/* instead of ENOENT */
++	dentry = ERR_PTR(-ESTALE);
 +	if (!arg.found)
 +		goto out_name;
 +
@@ -9760,7 +9778,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +	err = fh[Fh_h_type];
 +	*max_len += Fh_tail;
 +	/* todo: macros? */
-+	if (err != 255)
++	if (err != FILEID_INVALID)
 +		err = 99;
 +	else
 +		AuWarn1("%s encode_fh failed\n", au_sbtype(h_sb));
@@ -9774,7 +9792,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +	si_read_unlock(sb);
 +out:
 +	if (unlikely(err < 0))
-+		err = 255;
++		err = FILEID_INVALID;
 +	return err;
 +}
 +
@@ -9836,7 +9854,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 --- /usr/share/empty/fs/aufs/file.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/file.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,683 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -10523,7 +10541,7 @@ 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-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/file.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,298 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -10825,8 +10843,8 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +#endif /* __AUFS_FILE_H__ */
 diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 --- /usr/share/empty/fs/aufs/finfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c	2013-01-11 19:46:12.635947932 +0100
-@@ -0,0 +1,156 @@
++++ linux/fs/aufs/finfo.c	2013-02-19 08:40:03.946892891 +0100
+@@ -0,0 +1,157 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -10956,7 +10974,7 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 +
 +int au_finfo_init(struct file *file, struct au_fidir *fidir)
 +{
-+	int err, lc_idx;
++	int err;
 +	struct au_finfo *finfo;
 +	struct dentry *dentry;
 +
@@ -10968,10 +10986,11 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 +
 +	err = 0;
 +	au_nfiles_inc(dentry->d_sb);
-+	lc_idx = AuLcNonDir_FIINFO;
-+	if (fidir)
-+		lc_idx = AuLcDir_FIINFO;
-+	au_rw_class(&finfo->fi_rwsem, au_lc_key + lc_idx);
++	/* verbose coding for lock class name */
++	if (!fidir)
++		au_rw_class(&finfo->fi_rwsem, au_lc_key + AuLcNonDir_FIINFO);
++	else
++		au_rw_class(&finfo->fi_rwsem, au_lc_key + AuLcDir_FIINFO);
 +	au_rw_write_lock(&finfo->fi_rwsem);
 +	finfo->fi_btop = -1;
 +	finfo->fi_hdir = fidir;
@@ -10985,7 +11004,7 @@ 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-01-11 19:46:28.699667650 +0100
++++ linux/fs/aufs/f_op.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,723 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -11712,7 +11731,7 @@ 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-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/f_op_sp.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,295 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -12011,7 +12030,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op_sp.c linux/fs/aufs/f_op_sp.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 --- /usr/share/empty/fs/aufs/fstype.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h	2013-01-11 19:46:12.635947932 +0100
++++ linux/fs/aufs/fstype.h	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,481 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -12496,8 +12515,8 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#endif /* __AUFS_FSTYPE_H__ */
 diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 --- /usr/share/empty/fs/aufs/hfsnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c	2013-01-11 19:46:12.635947932 +0100
-@@ -0,0 +1,257 @@
++++ linux/fs/aufs/hfsnotify.c	2013-02-19 08:40:03.946892891 +0100
+@@ -0,0 +1,293 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -12535,12 +12554,13 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +	AuDbg("here\n");
 +	au_cache_free_hnotify(hn);
 +	smp_mb__before_atomic_dec();
-+	atomic64_dec(&au_hfsn_ifree);
-+	wake_up(&au_hfsn_wq);
++	if (atomic64_dec_and_test(&au_hfsn_ifree))
++		wake_up(&au_hfsn_wq);
 +}
 +
 +static int au_hfsn_alloc(struct au_hinode *hinode)
 +{
++	int err;
 +	struct au_hnotify *hn;
 +	struct super_block *sb;
 +	struct au_branch *br;
@@ -12551,6 +12571,8 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +	sb = hn->hn_aufs_inode->i_sb;
 +	bindex = au_br_index(sb, hinode->hi_id);
 +	br = au_sbr(sb, bindex);
++	AuDebugOn(!br->br_hfsn);
++
 +	mark = &hn->hn_mark;
 +	fsnotify_init_mark(mark, au_hfsn_free_mark);
 +	mark->mask = AuHfsnMask;
@@ -12558,21 +12580,30 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +	 * by udba rename or rmdir, aufs assign a new inode to the known
 +	 * h_inode, so specify 1 to allow dups.
 +	 */
-+	return fsnotify_add_mark(mark, br->br_hfsn_group, hinode->hi_inode,
++	err = fsnotify_add_mark(mark, br->br_hfsn->hfsn_group, hinode->hi_inode,
 +				 /*mnt*/NULL, /*allow_dups*/1);
++	/* even if err */
++	fsnotify_put_mark(mark);
++
++	return err;
 +}
 +
 +static int au_hfsn_free(struct au_hinode *hinode, struct au_hnotify *hn)
 +{
 +	struct fsnotify_mark *mark;
 +	unsigned long long ull;
++	struct fsnotify_group *group;
 +
 +	ull = atomic64_inc_return(&au_hfsn_ifree);
 +	BUG_ON(!ull);
 +
 +	mark = &hn->hn_mark;
-+	fsnotify_destroy_mark(mark);
-+	fsnotify_put_mark(mark);
++	spin_lock(&mark->lock);
++	group = mark->group;
++	fsnotify_get_group(group);
++	spin_unlock(&mark->lock);
++	fsnotify_destroy_mark(mark, group);
++	fsnotify_put_group(group);
 +
 +	/* free hn by myself */
 +	return 0;
@@ -12634,6 +12665,14 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +
 +/* ---------------------------------------------------------------------- */
 +
++static void au_hfsn_free_group(struct fsnotify_group *group)
++{
++	struct au_br_hfsnotify *hfsn = group->private;
++
++	AuDbg("here\n");
++	kfree(hfsn);
++}
++
 +static int au_hfsn_handle_event(struct fsnotify_group *group,
 +				struct fsnotify_mark *inode_mark,
 +				struct fsnotify_mark *vfsmount_mark,
@@ -12691,48 +12730,64 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +
 +static struct fsnotify_ops au_hfsn_ops = {
 +	.should_send_event	= au_hfsn_should_send_event,
-+	.handle_event		= au_hfsn_handle_event
++	.handle_event		= au_hfsn_handle_event,
++	.free_group_priv	= au_hfsn_free_group
 +};
 +
 +/* ---------------------------------------------------------------------- */
 +
 +static void au_hfsn_fin_br(struct au_branch *br)
 +{
-+	if (br->br_hfsn_group)
-+		fsnotify_put_group(br->br_hfsn_group);
-+}
++	struct au_br_hfsnotify *hfsn;
 +
-+static int au_hfsn_init_br(struct au_branch *br, int perm)
-+{
-+	br->br_hfsn_group = NULL;
-+	br->br_hfsn_ops = au_hfsn_ops;
-+	return 0;
++	hfsn = br->br_hfsn;
++	if (hfsn)
++		fsnotify_put_group(hfsn->hfsn_group);
 +}
 +
-+static int au_hfsn_reset_br(unsigned int udba, struct au_branch *br, int perm)
++static int au_hfsn_init_br(struct au_branch *br, int perm)
 +{
 +	int err;
++	struct fsnotify_group *group;
++	struct au_br_hfsnotify *hfsn;
 +
 +	err = 0;
-+	if (udba != AuOpt_UDBA_HNOTIFY
-+	    || !au_br_hnotifyable(perm)) {
-+		au_hfsn_fin_br(br);
-+		br->br_hfsn_group = NULL;
++	br->br_hfsn = NULL;
++	if (!au_br_hnotifyable(perm))
 +		goto out;
-+	}
 +
-+	if (br->br_hfsn_group)
++	err = -ENOMEM;
++	hfsn = kmalloc(sizeof(*hfsn), GFP_NOFS);
++	if (unlikely(!hfsn))
 +		goto out;
 +
-+	br->br_hfsn_group = fsnotify_alloc_group(&br->br_hfsn_ops);
-+	if (IS_ERR(br->br_hfsn_group)) {
-+		err = PTR_ERR(br->br_hfsn_group);
++	err = 0;
++	group = fsnotify_alloc_group(&au_hfsn_ops);
++	if (IS_ERR(group)) {
++		err = PTR_ERR(group);
 +		pr_err("fsnotify_alloc_group() failed, %d\n", err);
-+		br->br_hfsn_group = NULL;
++		goto out_hfsn;
 +	}
 +
++	group->private = hfsn;
++	hfsn->hfsn_group = group;
++	br->br_hfsn = hfsn;
++	goto out; /* success */
++
++out_hfsn:
++	kfree(hfsn);
 +out:
-+	AuTraceErr(err);
++	return err;
++}
++
++static int au_hfsn_reset_br(unsigned int udba, struct au_branch *br, int perm)
++{
++	int err;
++
++	err = 0;
++	if (!br->br_hfsn)
++		err = au_hfsn_init_br(br, perm);
++
 +	return err;
 +}
 +
@@ -12757,7 +12812,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/hfsplus.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,57 @@
 +/*
 + * Copyright (C) 2010-2013 Junjiro R. Okajima
@@ -12818,7 +12873,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +}
 diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 --- /usr/share/empty/fs/aufs/hnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/hnotify.c	2013-02-19 08:40:03.946892891 +0100
 @@ -0,0 +1,713 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -13535,7 +13590,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +}
 diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 --- /usr/share/empty/fs/aufs/iinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/iinfo.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,276 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -13815,8 +13870,8 @@ 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-01-11 19:46:12.639281345 +0100
-@@ -0,0 +1,488 @@
++++ linux/fs/aufs/inode.c	2013-02-19 08:40:03.950226347 +0100
+@@ -0,0 +1,492 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -14155,7 +14210,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +	struct super_block *sb;
 +	struct mutex *mtx;
 +	ino_t h_ino, ino;
-+	int err, lc_idx;
++	int err;
 +	aufs_bindex_t bstart;
 +
 +	sb = dentry->d_sb;
@@ -14196,12 +14251,16 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +
 +	AuDbg("%lx, new %d\n", inode->i_state, !!(inode->i_state & I_NEW));
 +	if (inode->i_state & I_NEW) {
-+		lc_idx = AuLcNonDir_IIINFO;
-+		if (S_ISLNK(h_inode->i_mode))
-+			lc_idx = AuLcSymlink_IIINFO;
-+		else if (S_ISDIR(h_inode->i_mode))
-+			lc_idx = AuLcDir_IIINFO;
-+		au_rw_class(&au_ii(inode)->ii_rwsem, au_lc_key + lc_idx);
++		/* verbose coding for lock class name */
++		if (unlikely(S_ISLNK(h_inode->i_mode)))
++			au_rw_class(&au_ii(inode)->ii_rwsem,
++				    au_lc_key + AuLcSymlink_IIINFO);
++		else if (unlikely(S_ISDIR(h_inode->i_mode)))
++			au_rw_class(&au_ii(inode)->ii_rwsem,
++				    au_lc_key + AuLcDir_IIINFO);
++		else /* likely */
++			au_rw_class(&au_ii(inode)->ii_rwsem,
++				    au_lc_key + AuLcNonDir_IIINFO);
 +
 +		ii_write_lock_new_child(inode);
 +		err = set_inode(inode, dentry);
@@ -14307,7 +14366,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +}
 diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 --- /usr/share/empty/fs/aufs/inode.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/inode.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,588 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -14899,7 +14958,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#endif /* __AUFS_INODE_H__ */
 diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 --- /usr/share/empty/fs/aufs/ioctl.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/ioctl.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,196 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -15099,7 +15158,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 --- /usr/share/empty/fs/aufs/i_op_add.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/i_op_add.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,713 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -15816,8 +15875,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 --- /usr/share/empty/fs/aufs/i_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c	2013-01-11 19:46:28.699667650 +0100
-@@ -0,0 +1,1026 @@
++++ linux/fs/aufs/i_op.c	2013-02-19 08:40:03.950226347 +0100
+@@ -0,0 +1,1030 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -15979,7 +16038,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +	struct dentry *ret, *parent;
 +	struct inode *inode;
 +	struct super_block *sb;
-+	int err, npositive, lc_idx;
++	int err, npositive;
 +
 +	IMustLock(dir);
 +
@@ -16046,12 +16105,16 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +out_unlock:
 +	di_write_unlock(dentry);
 +	if (inode) {
-+		lc_idx = AuLcNonDir_DIINFO;
-+		if (S_ISLNK(inode->i_mode))
-+			lc_idx = AuLcSymlink_DIINFO;
-+		else if (S_ISDIR(inode->i_mode))
-+			lc_idx = AuLcDir_DIINFO;
-+		au_rw_class(&au_di(dentry)->di_rwsem, au_lc_key + lc_idx);
++		/* verbose coding for lock class name */
++		if (unlikely(S_ISLNK(inode->i_mode)))
++			au_rw_class(&au_di(dentry)->di_rwsem,
++				    au_lc_key + AuLcSymlink_DIINFO);
++		else if (unlikely(S_ISDIR(inode->i_mode)))
++			au_rw_class(&au_di(dentry)->di_rwsem,
++				    au_lc_key + AuLcDir_DIINFO);
++		else /* likely */
++			au_rw_class(&au_di(dentry)->di_rwsem,
++				    au_lc_key + AuLcNonDir_DIINFO);
 +	}
 +out_si:
 +	si_read_unlock(sb);
@@ -16846,7 +16909,7 @@ 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-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/i_op_del.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,477 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -17327,7 +17390,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 --- /usr/share/empty/fs/aufs/i_op_ren.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/i_op_ren.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,1026 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -18564,7 +18627,7 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +endif
 diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 --- /usr/share/empty/fs/aufs/loop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/loop.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,133 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -18701,7 +18764,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 --- /usr/share/empty/fs/aufs/loop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/loop.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,50 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -18859,7 +18922,7 @@ 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-01-11 19:46:28.699667650 +0100
++++ linux/fs/aufs/module.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,202 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -19065,7 +19128,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +module_exit(aufs_exit);
 diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 --- /usr/share/empty/fs/aufs/module.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/module.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,105 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -19174,7 +19237,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#endif /* __AUFS_MODULE_H__ */
 diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 --- /usr/share/empty/fs/aufs/opts.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/opts.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,1677 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -20855,7 +20918,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 --- /usr/share/empty/fs/aufs/opts.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/opts.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,209 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -21068,7 +21131,7 @@ 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-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/plink.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,511 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -21583,7 +21646,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 +}
 diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 --- /usr/share/empty/fs/aufs/poll.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/poll.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,56 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -21643,7 +21706,7 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 +}
 diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 --- /usr/share/empty/fs/aufs/procfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/procfs.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,170 @@
 +/*
 + * Copyright (C) 2010-2013 Junjiro R. Okajima
@@ -21817,7 +21880,7 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 --- /usr/share/empty/fs/aufs/rdu.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/rdu.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,384 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -22205,7 +22268,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 --- /usr/share/empty/fs/aufs/rwsem.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/rwsem.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,188 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -22397,7 +22460,7 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +#endif /* __AUFS_RWSEM_H__ */
 diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 --- /usr/share/empty/fs/aufs/sbinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/sbinfo.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,343 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -22744,7 +22807,7 @@ 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-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/spl.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,62 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -22810,7 +22873,7 @@ diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
 +#endif /* __AUFS_SPL_H__ */
 diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 --- /usr/share/empty/fs/aufs/super.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/super.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,993 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -23807,7 +23870,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +};
 diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 --- /usr/share/empty/fs/aufs/super.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/super.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,546 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -24357,7 +24420,7 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +#endif /* __AUFS_SUPER_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 --- /usr/share/empty/fs/aufs/sysaufs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/sysaufs.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,105 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -24466,7 +24529,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 --- /usr/share/empty/fs/aufs/sysaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h	2013-01-11 19:46:12.639281345 +0100
++++ linux/fs/aufs/sysaufs.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,104 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -24574,7 +24637,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 +#endif /* __SYSAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 --- /usr/share/empty/fs/aufs/sysfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c	2013-01-11 19:46:12.642614759 +0100
++++ linux/fs/aufs/sysfs.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,257 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -24835,7 +24898,7 @@ 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-01-11 19:46:12.642614759 +0100
++++ linux/fs/aufs/sysrq.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,148 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -24987,7 +25050,7 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 --- /usr/share/empty/fs/aufs/vdir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c	2013-01-11 19:46:28.699667650 +0100
++++ linux/fs/aufs/vdir.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,885 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -25876,7 +25939,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 --- /usr/share/empty/fs/aufs/vfsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c	2013-01-11 19:46:12.642614759 +0100
++++ linux/fs/aufs/vfsub.c	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,777 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -26657,7 +26720,7 @@ 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-01-11 19:46:12.642614759 +0100
++++ linux/fs/aufs/vfsub.h	2013-02-19 08:40:03.950226347 +0100
 @@ -0,0 +1,284 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -26945,7 +27008,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#endif /* __AUFS_VFSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 --- /usr/share/empty/fs/aufs/wbr_policy.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c	2013-01-11 19:46:12.642614759 +0100
++++ linux/fs/aufs/wbr_policy.c	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,700 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -27649,7 +27712,7 @@ 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-01-11 19:46:28.699667650 +0100
++++ linux/fs/aufs/whout.c	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,1042 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -28695,7 +28758,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +}
 diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 --- /usr/share/empty/fs/aufs/whout.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h	2013-01-11 19:46:12.659281826 +0100
++++ linux/fs/aufs/whout.h	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,88 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -28787,7 +28850,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 +#endif /* __AUFS_WHOUT_H__ */
 diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 --- /usr/share/empty/fs/aufs/wkq.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c	2013-01-11 19:46:12.659281826 +0100
++++ linux/fs/aufs/wkq.c	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,214 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -29005,7 +29068,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 --- /usr/share/empty/fs/aufs/wkq.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h	2013-01-11 19:46:12.659281826 +0100
++++ linux/fs/aufs/wkq.h	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,92 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -29101,8 +29164,8 @@ 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-01-11 19:46:28.699667650 +0100
-@@ -0,0 +1,1264 @@
++++ linux/fs/aufs/xino.c	2013-02-19 08:40:03.953559833 +0100
+@@ -0,0 +1,1265 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
 + *
@@ -29421,7 +29484,8 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +
 +	ii_read_unlock(dir);
 +	if (unlikely(err))
-+		pr_warn("err b%d, (%d)\n", bindex, err);
++		pr_warn("err b%d, upper %llu, (%d)\n",
++			bindex, (unsigned long long)br->br_xino_upper, err);
 +	atomic_dec(&br->br_xino_running);
 +	atomic_dec(&br->br_count);
 +	si_write_unlock(sb);
@@ -30369,7 +30433,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +}
 diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_type.h
 --- /usr/share/empty/include/linux/aufs_type.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/linux/aufs_type.h	2013-01-11 19:46:28.699667650 +0100
++++ linux/include/linux/aufs_type.h	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,19 @@
 +/*
 + * Copyright (C) 2012-2013 Junjiro R. Okajima
@@ -30392,7 +30456,7 @@ diff -urN /usr/share/empty/include/linux/aufs_type.h linux/include/linux/aufs_ty
 +#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-01-11 19:46:28.699667650 +0100
++++ linux/include/uapi/linux/aufs_type.h	2013-02-19 08:40:03.953559833 +0100
 @@ -0,0 +1,233 @@
 +/*
 + * Copyright (C) 2005-2013 Junjiro R. Okajima
@@ -30435,7 +30499,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION	"3.7-20130107"
++#define AUFS_VERSION	"3.x-rcN-20130204"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
diff --git a/kernel-imq.patch b/kernel-imq.patch
index 6764dd8..ccc2014 100644
--- a/kernel-imq.patch
+++ b/kernel-imq.patch
@@ -1477,7 +1477,7 @@ diff -uNr linux-3.5/net/netfilter/nf_queue.c linux-3.5-imq/net/netfilter/nf_queu
  	/* QUEUE == DROP if no one is waiting, to be safe. */
  	rcu_read_lock();
  
--	qh = rcu_dereference(queue_handler[pf]);
+-	qh = rcu_dereference(queue_handler);
 +	if (queuetype == NF_IMQ_QUEUE) {
 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
 +		qh = rcu_dereference(queue_imq_handler);
@@ -1486,7 +1486,7 @@ diff -uNr linux-3.5/net/netfilter/nf_queue.c linux-3.5-imq/net/netfilter/nf_queu
 +		goto err_unlock;
 +#endif
 +	} else {
-+		qh = rcu_dereference(queue_handler[pf]);
++		qh = rcu_dereference(queue_handler);
 +	}
 +
  	if (!qh) {
diff --git a/kernel-layer7.patch b/kernel-layer7.patch
index 1c9aa8e..a390ab2 100644
--- a/kernel-layer7.patch
+++ b/kernel-layer7.patch
@@ -2061,9 +2061,9 @@
 +	#endif
 +
 +
- 	/* We overload first tuple to link into unconfirmed list. */
- 	if (!nf_ct_is_confirmed(ct)) {
- 		BUG_ON(hlist_unhashed(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode));
+ 	/* We overload first tuple to link into unconfirmed or dying list.*/
+ 	BUG_ON(hlist_nulls_unhashed(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode));
+ 	hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode);
 --- linux-2.6.28-stock/net/netfilter/nf_conntrack_standalone.c	2009-01-07 16:05:35.000000000 -0600
 +++ linux-2.6.28/net/netfilter/nf_conntrack_standalone.c	2009-01-07 16:07:31.000000000 -0600
 @@ -165,6 +165,12 @@ static int ct_seq_show(struct seq_file *
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index dea54c0..2c20420 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -49,653 +49,4 @@ index 7a0c800..ec5ebbb 100644
 -- 
 1.7.7.3
 
-From 4acca62e1f1976015ebb718242523e1832716bc7 Mon Sep 17 00:00:00 2001
-From: Takahisa Tanaka <mc74hc00 at gmail.com>
-Date: Wed, 14 Nov 2012 20:21:26 +0900
-Subject: [PATCH] sp5100_tco: Add SB8x0 chipset support
 
-The current sp5100_tco driver only supports SP5100/SB7x0 chipset, doesn't
-support SB8x0 chipset, because current sp5100_tco driver doesn't know that the
-offset address for watchdog timer was changed from SB8x0 chipset.
-
-The offset address of SP5100 and SB7x0 chipsets are as follows, quote from the
-AMD SB700/710/750 Register Reference Guide(Page 164) and the AMD SP5100
-Register Reference Guide(Page 166).
-
-  WatchDogTimerControl 69h
-  WatchDogTimerBase0   6Ch
-  WatchDogTimerBase1   6Dh
-  WatchDogTimerBase2   6Eh
-  WatchDogTimerBase3   6Fh
-
-In contrast, the offset address of SB8x0 chipset is as follows, quote from
-AMD SB800-Series Southbridges Register Reference Guide(Page 147).
-
-  WatchDogTimerEn      48h
-  WatchDogTimerConfig  4Ch
-
-So, In the case of SB8x0 chipset, sp5100_tco reads meaningless MMIO
-address(for example, 0xbafe00) from wrong offset address, and the following
-message is logged.
-
-   SP5100 TCO timer: mmio address 0xbafe00 already in use
-
-With this patch, sp5100_tco driver supports SB8x0 chipset, and can avoid
-iomem resource conflict.
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43176
-To: linux-watchdog at vger.kernel.org
-Signed-off-by: Takahisa Tanaka <mc74hc00 at gmail.com>
-
----
-v1 -> v2
- -Fix typo in module description and source code.
- -Fix a bug that can't correctly determine the watchdog fired.
- -Improve syslog messages.
- -Truncate the commit log, because previous commit log is too long.
----
- drivers/watchdog/sp5100_tco.c | 321 +++++++++++++++++++++++++++++++++++-------
- drivers/watchdog/sp5100_tco.h |  46 ++++--
- 2 files changed, 306 insertions(+), 61 deletions(-)
-
-diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
-index ae5e82c..183fcb2 100644
---- a/drivers/watchdog/sp5100_tco.c
-+++ b/drivers/watchdog/sp5100_tco.c
-@@ -13,7 +13,9 @@
-  *	as published by the Free Software Foundation; either version
-  *	2 of the License, or (at your option) any later version.
-  *
-- *	See AMD Publication 43009 "AMD SB700/710/750 Register Reference Guide"
-+ *	See AMD Publication 43009 "AMD SB700/710/750 Register Reference Guide",
-+ *	    AMD Publication 45482 "AMD SB800-Series Southbridges Register
-+ *	                                                      Reference Guide"
-  */
- 
- /*
-@@ -38,18 +40,24 @@
- #include "sp5100_tco.h"
- 
- /* Module and version information */
--#define TCO_VERSION "0.01"
-+#define TCO_VERSION "0.03"
- #define TCO_MODULE_NAME "SP5100 TCO timer"
- #define TCO_DRIVER_NAME   TCO_MODULE_NAME ", v" TCO_VERSION
- 
- /* internal variables */
- static u32 tcobase_phys;
-+static u32 resbase_phys;
-+static u32 tco_wdt_fired;
- static void __iomem *tcobase;
- static unsigned int pm_iobase;
- static DEFINE_SPINLOCK(tco_lock);	/* Guards the hardware */
- static unsigned long timer_alive;
- static char tco_expect_close;
- static struct pci_dev *sp5100_tco_pci;
-+static struct resource wdt_res = {
-+	.name = "Watchdog Timer",
-+	.flags = IORESOURCE_MEM,
-+};
- 
- /* the watchdog platform device */
- static struct platform_device *sp5100_tco_platform_device;
-@@ -64,9 +72,15 @@ MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (default="
- 
- static bool nowayout = WATCHDOG_NOWAYOUT;
- module_param(nowayout, bool, 0);
--MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"
-+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started."
- 		" (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
- 
-+static unsigned int force_addr;
-+module_param(force_addr, uint, 0);
-+MODULE_PARM_DESC(force_addr, "Force the use of specified MMIO address."
-+		" ONLY USE THIS PARAMETER IF YOU REALLY KNOW"
-+		" WHAT YOU ARE DOING (default=none)");
-+
- /*
-  * Some TCO specific functions
-  */
-@@ -122,6 +136,79 @@ static int tco_timer_set_heartbeat(int t)
- 	return 0;
- }
- 
-+static void tco_timer_enable(void)
-+{
-+	int val;
-+
-+	if (sp5100_tco_pci->revision >= 0x40) {
-+		/* For SB800 or later */
-+		/* Set the Watchdog timer resolution to 1 sec */
-+		outb(SB800_PM_WATCHDOG_CONFIG, SB800_IO_PM_INDEX_REG);
-+		val = inb(SB800_IO_PM_DATA_REG);
-+		val |= SB800_PM_WATCHDOG_SECOND_RES;
-+		outb(val, SB800_IO_PM_DATA_REG);
-+
-+		/* Enable watchdog decode bit and watchdog timer */
-+		outb(SB800_PM_WATCHDOG_CONTROL, SB800_IO_PM_INDEX_REG);
-+		val = inb(SB800_IO_PM_DATA_REG);
-+		val |= SB800_PCI_WATCHDOG_DECODE_EN;
-+		val &= ~SB800_PM_WATCHDOG_DISABLE;
-+		outb(val, SB800_IO_PM_DATA_REG);
-+	} else {
-+		/* For SP5100 or SB7x0 */
-+		/* Enable watchdog decode bit */
-+		pci_read_config_dword(sp5100_tco_pci,
-+				      SP5100_PCI_WATCHDOG_MISC_REG,
-+				      &val);
-+
-+		val |= SP5100_PCI_WATCHDOG_DECODE_EN;
-+
-+		pci_write_config_dword(sp5100_tco_pci,
-+				       SP5100_PCI_WATCHDOG_MISC_REG,
-+				       val);
-+
-+		/* Enable Watchdog timer and set the resolution to 1 sec */
-+		outb(SP5100_PM_WATCHDOG_CONTROL, SP5100_IO_PM_INDEX_REG);
-+		val = inb(SP5100_IO_PM_DATA_REG);
-+		val |= SP5100_PM_WATCHDOG_SECOND_RES;
-+		val &= ~SP5100_PM_WATCHDOG_DISABLE;
-+		outb(val, SP5100_IO_PM_DATA_REG);
-+	}
-+}
-+
-+static void tco_timer_disable(void)
-+{
-+	int val;
-+
-+	if (sp5100_tco_pci->revision >= 0x40) {
-+		/* For SB800 or later */
-+		/* Enable watchdog decode bit and Disable watchdog timer */
-+		outb(SB800_PM_WATCHDOG_CONTROL, SB800_IO_PM_INDEX_REG);
-+		val = inb(SB800_IO_PM_DATA_REG);
-+		val |= SB800_PCI_WATCHDOG_DECODE_EN;
-+		val |= SB800_PM_WATCHDOG_DISABLE;
-+		outb(val, SB800_IO_PM_DATA_REG);
-+	} else {
-+		/* For SP5100 or SB7x0 */
-+		/* Enable watchdog decode bit */
-+		pci_read_config_dword(sp5100_tco_pci,
-+				      SP5100_PCI_WATCHDOG_MISC_REG,
-+				      &val);
-+
-+		val |= SP5100_PCI_WATCHDOG_DECODE_EN;
-+
-+		pci_write_config_dword(sp5100_tco_pci,
-+				       SP5100_PCI_WATCHDOG_MISC_REG,
-+				       val);
-+
-+		/* Disable Watchdog timer */
-+		outb(SP5100_PM_WATCHDOG_CONTROL, SP5100_IO_PM_INDEX_REG);
-+		val = inb(SP5100_IO_PM_DATA_REG);
-+		val |= SP5100_PM_WATCHDOG_DISABLE;
-+		outb(val, SP5100_IO_PM_DATA_REG);
-+	}
-+}
-+
- /*
-  *	/dev/watchdog handling
-  */
-@@ -270,11 +357,12 @@ MODULE_DEVICE_TABLE(pci, sp5100_tco_pci_tbl);
- /*
-  * Init & exit routines
-  */
--
- static unsigned char __devinit sp5100_tco_setupdevice(void)
- {
- 	struct pci_dev *dev = NULL;
-+	const char *dev_name = NULL;
- 	u32 val;
-+	u32 index_reg, data_reg, base_addr;
- 
- 	/* Match the PCI device */
- 	for_each_pci_dev(dev) {
-@@ -287,29 +375,160 @@ static unsigned char __devinit sp5100_tco_setupdevice(void)
- 	if (!sp5100_tco_pci)
- 		return 0;
- 
-+	pr_info("PCI Revision ID: 0x%x\n", sp5100_tco_pci->revision);
-+
-+	/*
-+	 * Determine type of southbridge chipset.
-+	 */
-+	if (sp5100_tco_pci->revision >= 0x40) {
-+		dev_name = SB800_DEVNAME;
-+		index_reg = SB800_IO_PM_INDEX_REG;
-+		data_reg = SB800_IO_PM_DATA_REG;
-+		base_addr = SB800_PM_WATCHDOG_BASE;
-+	} else {
-+		dev_name = SP5100_DEVNAME;
-+		index_reg = SP5100_IO_PM_INDEX_REG;
-+		data_reg = SP5100_IO_PM_DATA_REG;
-+		base_addr = SP5100_PM_WATCHDOG_BASE;
-+	}
-+
- 	/* Request the IO ports used by this driver */
- 	pm_iobase = SP5100_IO_PM_INDEX_REG;
--	if (!request_region(pm_iobase, SP5100_PM_IOPORTS_SIZE, "SP5100 TCO")) {
-+	if (!request_region(pm_iobase, SP5100_PM_IOPORTS_SIZE, dev_name)) {
- 		pr_err("I/O address 0x%04x already in use\n", pm_iobase);
- 		goto exit;
- 	}
- 
--	/* Find the watchdog base address. */
--	outb(SP5100_PM_WATCHDOG_BASE3, SP5100_IO_PM_INDEX_REG);
--	val = inb(SP5100_IO_PM_DATA_REG);
--	outb(SP5100_PM_WATCHDOG_BASE2, SP5100_IO_PM_INDEX_REG);
--	val = val << 8 | inb(SP5100_IO_PM_DATA_REG);
--	outb(SP5100_PM_WATCHDOG_BASE1, SP5100_IO_PM_INDEX_REG);
--	val = val << 8 | inb(SP5100_IO_PM_DATA_REG);
--	outb(SP5100_PM_WATCHDOG_BASE0, SP5100_IO_PM_INDEX_REG);
--	/* Low three bits of BASE0 are reserved. */
--	val = val << 8 | (inb(SP5100_IO_PM_DATA_REG) & 0xf8);
-+	/*
-+	 * First, Find the watchdog timer MMIO address from indirect I/O.
-+	 */
-+	outb(base_addr+3, index_reg);
-+	val = inb(data_reg);
-+	outb(base_addr+2, index_reg);
-+	val = val << 8 | inb(data_reg);
-+	outb(base_addr+1, index_reg);
-+	val = val << 8 | inb(data_reg);
-+	outb(base_addr+0, index_reg);
-+	/* Low three bits of BASE are reserved */
-+	val = val << 8 | (inb(data_reg) & 0xf8);
-+
-+	pr_debug("Got 0x%04x from indirect I/O\n", val);
-+
-+	/* Check MMIO address conflict */
-+	if (request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE,
-+								dev_name))
-+		goto setup_wdt;
-+	else
-+		pr_debug("MMIO address 0x%04x already in use\n", val);
-+
-+	/*
-+	 * Secondly, Find the watchdog timer MMIO address
-+	 * from SBResource_MMIO register.
-+	 */
-+	if (sp5100_tco_pci->revision >= 0x40) {
-+		/* Read SBResource_MMIO from AcpiMmioEn(PM_Reg: 24h) */
-+		outb(SB800_PM_ACPI_MMIO_EN+3, SB800_IO_PM_INDEX_REG);
-+		val = inb(SB800_IO_PM_DATA_REG);
-+		outb(SB800_PM_ACPI_MMIO_EN+2, SB800_IO_PM_INDEX_REG);
-+		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
-+		outb(SB800_PM_ACPI_MMIO_EN+1, SB800_IO_PM_INDEX_REG);
-+		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
-+		outb(SB800_PM_ACPI_MMIO_EN+0, SB800_IO_PM_INDEX_REG);
-+		val = val << 8 | inb(SB800_IO_PM_DATA_REG);
-+	} else {
-+		/* Read SBResource_MMIO from PCI config(PCI_Reg: 9Ch) */
-+		pci_read_config_dword(sp5100_tco_pci,
-+				      SP5100_SB_RESOURCE_MMIO_BASE, &val);
-+	}
-+
-+	/* The SBResource_MMIO is enabled and mapped memory space? */
-+	if ((val & (SB800_ACPI_MMIO_DECODE_EN | SB800_ACPI_MMIO_SEL)) ==
-+						  SB800_ACPI_MMIO_DECODE_EN) {
-+		/* Clear unnecessary the low twelve bits */
-+		val &= ~0xFFF;
-+		/* Add the Watchdog Timer offset to base address. */
-+		val += SB800_PM_WDT_MMIO_OFFSET;
-+		/* Check MMIO address conflict */
-+		if (request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE,
-+								   dev_name)) {
-+			pr_debug("Got 0x%04x from SBResource_MMIO register\n",
-+				val);
-+			goto setup_wdt;
-+		} else
-+			pr_debug("MMIO address 0x%04x already in use\n", val);
-+	} else
-+		pr_debug("SBResource_MMIO is disabled(0x%04x)\n", val);
-+
-+	/*
-+	 * Lastly re-programming the watchdog timer MMIO address,
-+	 * This method is a last resort...
-+	 *
-+	 * Before re-programming, to ensure that the watchdog timer
-+	 * is disabled, disable the watchdog timer.
-+	 */
-+	tco_timer_disable();
-+
-+	if (force_addr) {
-+		/*
-+		 * Force the use of watchdog timer MMIO address, and aligned to
-+		 * 8byte boundary.
-+		 */
-+		force_addr &= ~0x7;
-+		val = force_addr;
-+
-+		pr_info("Force the use of 0x%04x as MMIO address\n", val);
-+	} else {
-+		/*
-+		 * Get empty slot into the resource tree for watchdog timer.
-+		 */
-+		if (allocate_resource(&iomem_resource,
-+				      &wdt_res,
-+				      SP5100_WDT_MEM_MAP_SIZE,
-+				      0xf0000000,
-+				      0xfffffff8,
-+				      0x8,
-+				      NULL,
-+				      NULL)) {
-+			pr_err("MMIO allocation failed\n");
-+			goto unreg_region;
-+		}
-+
-+		val = resbase_phys = wdt_res.start;
-+		pr_debug("Got 0x%04x from resource tree\n", val);
-+	}
-+
-+	/* Restore to the low three bits, if chipset is SB8x0(or later) */
-+	if (sp5100_tco_pci->revision >= 0x40) {
-+		u8 reserved_bit;
-+		reserved_bit = inb(base_addr) & 0x7;
-+		val |= (u32)reserved_bit;
-+	}
-+
-+	/* Re-programming the watchdog timer base address */
-+	outb(base_addr+0, index_reg);
-+	/* Low three bits of BASE are reserved */
-+	outb((val >>  0) & 0xf8, data_reg);
-+	outb(base_addr+1, index_reg);
-+	outb((val >>  8) & 0xff, data_reg);
-+	outb(base_addr+2, index_reg);
-+	outb((val >> 16) & 0xff, data_reg);
-+	outb(base_addr+3, index_reg);
-+	outb((val >> 24) & 0xff, data_reg);
-+
-+	/*
-+	 * Clear unnecessary the low three bits,
-+	 * if chipset is SB8x0(or later)
-+	 */
-+	if (sp5100_tco_pci->revision >= 0x40)
-+		val &= ~0x7;
- 
- 	if (!request_mem_region_exclusive(val, SP5100_WDT_MEM_MAP_SIZE,
--								"SP5100 TCO")) {
--		pr_err("mmio address 0x%04x already in use\n", val);
--		goto unreg_region;
-+								   dev_name)) {
-+		pr_err("MMIO address 0x%04x already in use\n", val);
-+		goto unreg_resource;
- 	}
-+
-+setup_wdt:
- 	tcobase_phys = val;
- 
- 	tcobase = ioremap(val, SP5100_WDT_MEM_MAP_SIZE);
-@@ -318,26 +537,18 @@ static unsigned char __devinit sp5100_tco_setupdevice(void)
- 		goto unreg_mem_region;
- 	}
- 
--	/* Enable watchdog decode bit */
--	pci_read_config_dword(sp5100_tco_pci,
--			      SP5100_PCI_WATCHDOG_MISC_REG,
--			      &val);
--
--	val |= SP5100_PCI_WATCHDOG_DECODE_EN;
-+	pr_info("Using 0x%04x for watchdog MMIO address\n", val);
- 
--	pci_write_config_dword(sp5100_tco_pci,
--			       SP5100_PCI_WATCHDOG_MISC_REG,
--			       val);
-+	/* Setup the watchdog timer */
-+	tco_timer_enable();
- 
--	/* Enable Watchdog timer and set the resolution to 1 sec. */
--	outb(SP5100_PM_WATCHDOG_CONTROL, SP5100_IO_PM_INDEX_REG);
--	val = inb(SP5100_IO_PM_DATA_REG);
--	val |= SP5100_PM_WATCHDOG_SECOND_RES;
--	val &= ~SP5100_PM_WATCHDOG_DISABLE;
--	outb(val, SP5100_IO_PM_DATA_REG);
--
--	/* Check that the watchdog action is set to reset the system. */
-+	/* Check that the watchdog action is set to reset the system */
- 	val = readl(SP5100_WDT_CONTROL(tcobase));
-+	/*
-+	 * Save WatchDogFired status, because WatchDogFired flag is
-+	 * cleared here.
-+	 */
-+	tco_wdt_fired = val & SP5100_PM_WATCHDOG_FIRED;
- 	val &= ~SP5100_PM_WATCHDOG_ACTION_RESET;
- 	writel(val, SP5100_WDT_CONTROL(tcobase));
- 
-@@ -355,6 +566,9 @@ static unsigned char __devinit sp5100_tco_setupdevice(void)
- 
- unreg_mem_region:
- 	release_mem_region(tcobase_phys, SP5100_WDT_MEM_MAP_SIZE);
-+unreg_resource:
-+	if (resbase_phys)
-+		release_resource(&wdt_res);
- unreg_region:
- 	release_region(pm_iobase, SP5100_PM_IOPORTS_SIZE);
- exit:
-@@ -364,23 +578,18 @@ exit:
- static int __devinit sp5100_tco_init(struct platform_device *dev)
- {
- 	int ret;
--	u32 val;
-+	char addr_str[16];
- 
--	/* Check whether or not the hardware watchdog is there. If found, then
-+	/*
-+	 * Check whether or not the hardware watchdog is there. If found, then
- 	 * set it up.
- 	 */
- 	if (!sp5100_tco_setupdevice())
- 		return -ENODEV;
- 
- 	/* Check to see if last reboot was due to watchdog timeout */
--	pr_info("Watchdog reboot %sdetected\n",
--		readl(SP5100_WDT_CONTROL(tcobase)) & SP5100_PM_WATCHDOG_FIRED ?
--		"" : "not ");
--
--	/* Clear out the old status */
--	val = readl(SP5100_WDT_CONTROL(tcobase));
--	val &= ~SP5100_PM_WATCHDOG_FIRED;
--	writel(val, SP5100_WDT_CONTROL(tcobase));
-+	pr_info("Last reboot was %striggered by watchdog.\n",
-+		tco_wdt_fired ? "" : "not ");
- 
- 	/*
- 	 * Check that the heartbeat value is within it's range.
-@@ -400,14 +609,24 @@ static int __devinit sp5100_tco_init(struct platform_device *dev)
- 
- 	clear_bit(0, &timer_alive);
- 
--	pr_info("initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n",
--		tcobase, heartbeat, nowayout);
-+	/* Show module parameters */
-+	if (force_addr == tcobase_phys)
-+		/* The force_addr is vaild */
-+		sprintf(addr_str, "0x%04x", force_addr);
-+	else
-+		strcpy(addr_str, "none");
-+
-+	pr_info("initialized (0x%p). heartbeat=%d sec (nowayout=%d, "
-+		"force_addr=%s)\n",
-+		tcobase, heartbeat, nowayout, addr_str);
- 
- 	return 0;
- 
- exit:
- 	iounmap(tcobase);
- 	release_mem_region(tcobase_phys, SP5100_WDT_MEM_MAP_SIZE);
-+	if (resbase_phys)
-+		release_resource(&wdt_res);
- 	release_region(pm_iobase, SP5100_PM_IOPORTS_SIZE);
- 	return ret;
- }
-@@ -422,6 +641,8 @@ static void __devexit sp5100_tco_cleanup(void)
- 	misc_deregister(&sp5100_tco_miscdev);
- 	iounmap(tcobase);
- 	release_mem_region(tcobase_phys, SP5100_WDT_MEM_MAP_SIZE);
-+	if (resbase_phys)
-+		release_resource(&wdt_res);
- 	release_region(pm_iobase, SP5100_PM_IOPORTS_SIZE);
- }
- 
-@@ -451,7 +672,7 @@ static int __init sp5100_tco_init_module(void)
- {
- 	int err;
- 
--	pr_info("SP5100 TCO WatchDog Timer Driver v%s\n", TCO_VERSION);
-+	pr_info("SP5100/SB800 TCO WatchDog Timer Driver v%s\n", TCO_VERSION);
- 
- 	err = platform_driver_register(&sp5100_tco_driver);
- 	if (err)
-@@ -475,13 +696,13 @@ static void __exit sp5100_tco_cleanup_module(void)
- {
- 	platform_device_unregister(sp5100_tco_platform_device);
- 	platform_driver_unregister(&sp5100_tco_driver);
--	pr_info("SP5100 TCO Watchdog Module Unloaded\n");
-+	pr_info("SP5100/SB800 TCO Watchdog Module Unloaded\n");
- }
- 
- module_init(sp5100_tco_init_module);
- module_exit(sp5100_tco_cleanup_module);
- 
- MODULE_AUTHOR("Priyanka Gupta");
--MODULE_DESCRIPTION("TCO timer driver for SP5100 chipset");
-+MODULE_DESCRIPTION("TCO timer driver for SP5100/SB800 chipset");
- MODULE_LICENSE("GPL");
- MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
-diff --git a/drivers/watchdog/sp5100_tco.h b/drivers/watchdog/sp5100_tco.h
-index a5a16cc..71594a0 100644
---- a/drivers/watchdog/sp5100_tco.h
-+++ b/drivers/watchdog/sp5100_tco.h
-@@ -9,33 +9,57 @@
- /*
-  * Some address definitions for the Watchdog
-  */
--
- #define SP5100_WDT_MEM_MAP_SIZE		0x08
- #define SP5100_WDT_CONTROL(base)	((base) + 0x00) /* Watchdog Control */
- #define SP5100_WDT_COUNT(base)		((base) + 0x04) /* Watchdog Count */
- 
--#define SP5100_WDT_START_STOP_BIT	1
-+#define SP5100_WDT_START_STOP_BIT	(1 << 0)
- #define SP5100_WDT_TRIGGER_BIT		(1 << 7)
- 
--#define SP5100_PCI_WATCHDOG_MISC_REG	0x41
--#define SP5100_PCI_WATCHDOG_DECODE_EN	(1 << 3)
--
- #define SP5100_PM_IOPORTS_SIZE		0x02
- 
--/* These two IO registers are hardcoded and there doesn't seem to be a way to
-+/*
-+ * These two IO registers are hardcoded and there doesn't seem to be a way to
-  * read them from a register.
-  */
-+
-+/*  For SP5100/SB7x0 chipset */
- #define SP5100_IO_PM_INDEX_REG		0xCD6
- #define SP5100_IO_PM_DATA_REG		0xCD7
- 
-+#define SP5100_SB_RESOURCE_MMIO_BASE	0x9C
-+
- #define SP5100_PM_WATCHDOG_CONTROL	0x69
--#define SP5100_PM_WATCHDOG_BASE0	0x6C
--#define SP5100_PM_WATCHDOG_BASE1	0x6D
--#define SP5100_PM_WATCHDOG_BASE2	0x6E
--#define SP5100_PM_WATCHDOG_BASE3	0x6F
-+#define SP5100_PM_WATCHDOG_BASE		0x6C
- 
- #define SP5100_PM_WATCHDOG_FIRED	(1 << 1)
- #define SP5100_PM_WATCHDOG_ACTION_RESET	(1 << 2)
- 
--#define SP5100_PM_WATCHDOG_DISABLE	1
-+#define SP5100_PCI_WATCHDOG_MISC_REG	0x41
-+#define SP5100_PCI_WATCHDOG_DECODE_EN	(1 << 3)
-+
-+#define SP5100_PM_WATCHDOG_DISABLE	(1 << 0)
- #define SP5100_PM_WATCHDOG_SECOND_RES	(3 << 1)
-+
-+#define SP5100_DEVNAME			"SP5100 TCO"
-+
-+
-+/*  For SB8x0(or later) chipset */
-+#define SB800_IO_PM_INDEX_REG		0xCD6
-+#define SB800_IO_PM_DATA_REG		0xCD7
-+
-+#define SB800_PM_ACPI_MMIO_EN		0x24
-+#define SB800_PM_WATCHDOG_CONTROL	0x48
-+#define SB800_PM_WATCHDOG_BASE		0x48
-+#define SB800_PM_WATCHDOG_CONFIG	0x4C
-+
-+#define SB800_PCI_WATCHDOG_DECODE_EN	(1 << 0)
-+#define SB800_PM_WATCHDOG_DISABLE	(1 << 2)
-+#define SB800_PM_WATCHDOG_SECOND_RES	(3 << 0)
-+#define SB800_ACPI_MMIO_DECODE_EN	(1 << 0)
-+#define SB800_ACPI_MMIO_SEL		(1 << 2)
-+
-+
-+#define SB800_PM_WDT_MMIO_OFFSET	0xB00
-+
-+#define SB800_DEVNAME			"SB800 TCO"
--- 
-1.7.11.7
-
-From eba48cd0f05ff7a2f82291feae169c14b61b29af Mon Sep 17 00:00:00 2001
-From: Andrew Cooks <acooks at gmail.com>
-Date: Tue, 13 Nov 2012 12:39:07 +0800
-Subject: [PATCH] PCI: Add GPL license for drivers/pci/ioapic module
-
-Config PCI_IOAPIC turned into a tristate in commit b95a7bd70046, but no
-module license is specified.  This adds the missing module license.
-
-Signed-off-by: Andrew Cooks <acooks at gmail.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
-Acked-by: Jan Beulich <jbeulich at suse.com>
----
- drivers/pci/ioapic.c |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c
-index 205af8d..22436f7 100644
---- a/drivers/pci/ioapic.c
-+++ b/drivers/pci/ioapic.c
-@@ -125,3 +125,5 @@ static void __exit ioapic_exit(void)
- 
- module_init(ioapic_init);
- module_exit(ioapic_exit);
-+
-+MODULE_LICENSE("GPL");
--- 
-1.7.6.5
-
-
-diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
-index 042c1ff..d07c240 100644
---- a/drivers/regulator/core.c
-+++ b/drivers/regulator/core.c
-@@ -1872,7 +1872,14 @@ int regulator_count_voltages(struct regulator *regulator)
- {
- 	struct regulator_dev	*rdev = regulator->rdev;
-
--	return rdev->desc->n_voltages ? : -EINVAL;
-+	if (rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE) {
-+		if (rdev->desc->n_voltages)
-+			return rdev->desc->n_voltages;
-+		else
-+			return -EINVAL;
-+	} else {
-+		return 1;
-+	}
- }
- EXPORT_SYMBOL_GPL(regulator_count_voltages);
-
-diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
-index c7851c0..6f6534e 100644
---- a/drivers/mmc/host/sdhci.c
-+++ b/drivers/mmc/host/sdhci.c
-@@ -2923,7 +2923,7 @@ int sdhci_add_host(struct sdhci_host *host)
- 		regulator_enable(host->vmmc);
-
- #ifdef CONFIG_REGULATOR
--	if (host->vmmc) {
-+	if (host->vmmc && regulator_count_voltages(host->vmmc) > 1) {
- 		ret = regulator_is_supported_voltage(host->vmmc, 3300000,
- 			3300000);
- 		if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))
diff --git a/kernel-virtio-gl-accel.patch b/kernel-virtio-gl-accel.patch
index acaf589..fbd282a 100644
--- a/kernel-virtio-gl-accel.patch
+++ b/kernel-virtio-gl-accel.patch
@@ -306,7 +306,7 @@ index 0000000..8882bda
 +	return 0;
 +}
 +
-+static void __devexit glmem_remove(struct virtio_device *vdev)
++static void glmem_remove(struct virtio_device *vdev)
 +{
 +	vdev->config->reset(vdev);
 +	misc_deregister(&glmem_dev);
@@ -325,7 +325,7 @@ index 0000000..8882bda
 +	},
 +	.id_table =     id_table,
 +	.probe =        glmem_probe,
-+	.remove =       __devexit_p(glmem_remove),
++	.remove =       glmem_remove,
 +};
 +
 +static int __init glmem_init(void)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/1716fcea230da35a030c78a79a53d6d39d21d655



More information about the pld-cvs-commit mailing list