[PATCH][ARTFUL] UBUNTU: SAUCE: (noup) Update spl to 0.6.5.9-1ubuntu2, zfs to 0.6.5.9-5ubuntu7

Colin King colin.king at canonical.com
Wed Jun 7 12:28:24 UTC 2017


From: Colin Ian King <colin.king at canonical.com>

Sync with upstream 4.12 compat fixes to build with 4.12. Tested against
upstream 4.12-rc4 and ubuntu Artful 4.11 kernels.

SPL:
  * Add 4.12 compat patch from upstream to build with 4.12 kernel:
    - 8f87971e1fd11e Linux 4.12 compat: PF_FSTRANS was removed
ZFS:
  * Add 4.12 compat patches from upstream to build with 4.12 kernel:
    - 608d6942b70436 Linux 4.12 compat: super_setup_bdi_name()
    - e624cd19599047 Linux 4.12 compat: PF_FSTRANS was removed
    - 2946a1a15aab87 Linux 4.12 compat: CURRENT_TIME removed
    - 3e6c9433474f0b Linux 4.12 compat: fix super_setup_bdi_name() call

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 spl/META                                    |    2 +-
 spl/include/sys/kmem.h                      |   37 +-
 spl/module/spl/spl-vnode.c                  |    6 +-
 zfs/META                                    |    2 +-
 zfs/Makefile.in                             |    3 +-
 zfs/aclocal.m4                              |    3 +-
 zfs/config/kernel-bdi-setup-and-register.m4 |   38 -
 zfs/config/kernel-bdi.m4                    |   56 +
 zfs/config/kernel-current-time.m4           |   19 +
 zfs/config/kernel.m4                        |    3 +-
 zfs/configure                               | 2252 ++++++++++++++++++++-------
 zfs/include/Makefile.in                     |    3 +-
 zfs/include/linux/Makefile.in               |    3 +-
 zfs/include/linux/vfs_compat.h              |  105 +-
 zfs/include/sys/Makefile.in                 |    3 +-
 zfs/include/sys/fm/Makefile.in              |    3 +-
 zfs/include/sys/fm/fs/Makefile.in           |    3 +-
 zfs/include/sys/fs/Makefile.in              |    3 +-
 zfs/include/sys/zfs_context.h               |    1 +
 zfs/include/sys/zfs_vfsops.h                |    1 -
 zfs/module/zfs/vdev_file.c                  |    2 +-
 zfs/module/zfs/zfs_ctldir.c                 |    3 +-
 zfs/module/zfs/zfs_vfsops.c                 |    8 +-
 zfs/module/zfs/zpl_ctldir.c                 |   15 +-
 zfs/module/zfs/zpl_inode.c                  |    2 +-
 zfs/module/zfs/zpl_xattr.c                  |    5 +-
 zfs/zfs_config.h.in                         |    6 +
 27 files changed, 1909 insertions(+), 678 deletions(-)
 delete mode 100644 zfs/config/kernel-bdi-setup-and-register.m4
 create mode 100644 zfs/config/kernel-bdi.m4
 create mode 100644 zfs/config/kernel-current-time.m4

diff --git a/spl/META b/spl/META
index efdbe6702e1b..01031b1e43ad 100644
--- a/spl/META
+++ b/spl/META
@@ -2,7 +2,7 @@ Meta:         1
 Name:         spl
 Branch:       1.0
 Version:      0.6.5.9
-Release:      1ubuntu1
+Release:      1ubuntu2
 Release-Tags: relext
 License:      GPL
 Author:       OpenZFS on Linux
diff --git a/spl/include/sys/kmem.h b/spl/include/sys/kmem.h
index d4b3bf680a45..d6b428551fe1 100644
--- a/spl/include/sys/kmem.h
+++ b/spl/include/sys/kmem.h
@@ -46,6 +46,8 @@ extern void strfree(char *str);
 
 #define	KM_PUBLIC_MASK	(KM_SLEEP | KM_NOSLEEP | KM_PUSHPAGE)
 
+static int spl_fstrans_check(void);
+
 /*
  * Convert a KM_* flags mask to its Linux GFP_* counterpart.  The conversion
  * function is context aware which means that KM_SLEEP allocations can be
@@ -60,7 +62,7 @@ kmem_flags_convert(int flags)
 		lflags |= GFP_ATOMIC | __GFP_NORETRY;
 	} else {
 		lflags |= GFP_KERNEL;
-		if ((current->flags & PF_FSTRANS))
+		if (spl_fstrans_check())
 			lflags &= ~(__GFP_IO|__GFP_FS);
 	}
 
@@ -78,17 +80,34 @@ typedef struct {
 	unsigned int saved_flags;
 } fstrans_cookie_t;
 
+/*
+ * Introduced in Linux 3.9, however this cannot be solely relied on before
+ * Linux 3.18 as it doesn't turn off __GFP_FS as it should.
+ */
 #ifdef PF_MEMALLOC_NOIO
-#define	SPL_FSTRANS (PF_FSTRANS|PF_MEMALLOC_NOIO)
+#define	__SPL_PF_MEMALLOC_NOIO (PF_MEMALLOC_NOIO)
+#else
+#define	__SPL_PF_MEMALLOC_NOIO (0)
+#endif
+
+/*
+ * PF_FSTRANS is removed from Linux 4.12
+ */
+#ifdef PF_FSTRANS
+#define	__SPL_PF_FSTRANS (PF_FSTRANS)
 #else
-#define	SPL_FSTRANS (PF_FSTRANS)
+#define	__SPL_PF_FSTRANS (0)
 #endif
 
+#define	SPL_FSTRANS (__SPL_PF_FSTRANS|__SPL_PF_MEMALLOC_NOIO)
+
 static inline fstrans_cookie_t
 spl_fstrans_mark(void)
 {
 	fstrans_cookie_t cookie;
 
+	BUILD_BUG_ON(SPL_FSTRANS == 0);
+
 	cookie.fstrans_thread = current;
 	cookie.saved_flags = current->flags & SPL_FSTRANS;
 	current->flags |= SPL_FSTRANS;
@@ -109,7 +128,17 @@ spl_fstrans_unmark(fstrans_cookie_t cookie)
 static inline int
 spl_fstrans_check(void)
 {
-	return (current->flags & PF_FSTRANS);
+	return (current->flags & SPL_FSTRANS);
+}
+
+/*
+ * specifically used to check PF_FSTRANS flag, cannot be relied on for
+ * checking spl_fstrans_mark().
+ */
+static inline int
+__spl_pf_fstrans_check(void)
+{
+	return (current->flags & __SPL_PF_FSTRANS);
 }
 
 #ifdef HAVE_ATOMIC64_T
diff --git a/spl/module/spl/spl-vnode.c b/spl/module/spl/spl-vnode.c
index a548d37f7acb..6ee147e0e7d8 100644
--- a/spl/module/spl/spl-vnode.c
+++ b/spl/module/spl/spl-vnode.c
@@ -562,13 +562,13 @@ int vn_fsync(vnode_t *vp, int flags, void *x3, void *x4)
 	 * May enter XFS which generates a warning when PF_FSTRANS is set.
 	 * To avoid this the flag is cleared over vfs_sync() and then reset.
 	 */
-	fstrans = spl_fstrans_check();
+	fstrans = __spl_pf_fstrans_check();
 	if (fstrans)
-		current->flags &= ~(PF_FSTRANS);
+		current->flags &= ~(__SPL_PF_FSTRANS);
 
 	error = -spl_filp_fsync(vp->v_file, datasync);
 	if (fstrans)
-		current->flags |= PF_FSTRANS;
+		current->flags |= __SPL_PF_FSTRANS;
 
 	return (error);
 } /* vn_fsync() */
diff --git a/zfs/META b/zfs/META
index aaa41d5cf4e0..eb6b41980169 100644
--- a/zfs/META
+++ b/zfs/META
@@ -2,7 +2,7 @@ Meta:         1
 Name:         zfs
 Branch:       1.0
 Version:      0.6.5.9
-Release:      5ubuntu5
+Release:      5ubuntu7
 Release-Tags: relext
 License:      CDDL
 Author:       OpenZFS on Linux
diff --git a/zfs/Makefile.in b/zfs/Makefile.in
index 76d341c30e1a..20b347ccebb0 100644
--- a/zfs/Makefile.in
+++ b/zfs/Makefile.in
@@ -108,7 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -126,6 +126,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/aclocal.m4 b/zfs/aclocal.m4
index 95ba8522e75b..f9ec5cd831e0 100644
--- a/zfs/aclocal.m4
+++ b/zfs/aclocal.m4
@@ -1215,7 +1215,7 @@ m4_include([config/kernel-automount.m4])
 m4_include([config/kernel-bdev-block-device-operations.m4])
 m4_include([config/kernel-bdev-logical-size.m4])
 m4_include([config/kernel-bdev-physical-size.m4])
-m4_include([config/kernel-bdi-setup-and-register.m4])
+m4_include([config/kernel-bdi.m4])
 m4_include([config/kernel-bio-bvec-iter.m4])
 m4_include([config/kernel-bio-end-io-t-args.m4])
 m4_include([config/kernel-bio-failfast.m4])
@@ -1233,6 +1233,7 @@ m4_include([config/kernel-check-disk-size-change.m4])
 m4_include([config/kernel-clear-inode.m4])
 m4_include([config/kernel-commit-metadata.m4])
 m4_include([config/kernel-create-nameidata.m4])
+m4_include([config/kernel-current-time.m4])
 m4_include([config/kernel-current_bio_tail.m4])
 m4_include([config/kernel-d-make-root.m4])
 m4_include([config/kernel-d-obtain-alias.m4])
diff --git a/zfs/config/kernel-bdi-setup-and-register.m4 b/zfs/config/kernel-bdi-setup-and-register.m4
deleted file mode 100644
index d1062e17ec1e..000000000000
--- a/zfs/config/kernel-bdi-setup-and-register.m4
+++ /dev/null
@@ -1,38 +0,0 @@
-dnl #
-dnl # 2.6.32 - 2.6.33, bdi_setup_and_register() is not exported.
-dnl # 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
-dnl # 4.0 - x.y, bdi_setup_and_register() takes 2 arguments.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [
-	AC_MSG_CHECKING([whether bdi_setup_and_register() wants 2 args])
-	ZFS_LINUX_TRY_COMPILE_SYMBOL([
-		#include <linux/backing-dev.h>
-		struct backing_dev_info bdi;
-	], [
-		char *name = "bdi";
-		int error __attribute__((unused)) =
-		    bdi_setup_and_register(&bdi, name);
-	], [bdi_setup_and_register], [mm/backing-dev.c], [
-		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_2ARGS_BDI_SETUP_AND_REGISTER, 1,
-		    [bdi_setup_and_register() wants 2 args])
-	], [
-		AC_MSG_RESULT(no)
-		AC_MSG_CHECKING([whether bdi_setup_and_register() wants 3 args])
-		ZFS_LINUX_TRY_COMPILE_SYMBOL([
-			#include <linux/backing-dev.h>
-			struct backing_dev_info bdi;
-		], [
-			char *name = "bdi";
-			unsigned int cap = BDI_CAP_MAP_COPY;
-			int error __attribute__((unused)) =
-			    bdi_setup_and_register(&bdi, name, cap);
-		], [bdi_setup_and_register], [mm/backing-dev.c], [
-			AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,
-			    [bdi_setup_and_register() wants 3 args])
-		], [
-			AC_MSG_RESULT(no)
-		])
-	])
-])
diff --git a/zfs/config/kernel-bdi.m4 b/zfs/config/kernel-bdi.m4
new file mode 100644
index 000000000000..53945651f406
--- /dev/null
+++ b/zfs/config/kernel-bdi.m4
@@ -0,0 +1,56 @@
+dnl #
+dnl # 2.6.32 - 2.6.33, bdi_setup_and_register() is not exported.
+dnl # 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
+dnl # 4.0 - 4.11, bdi_setup_and_register() takes 2 arguments.
+dnl # 4.12 - x.y, super_setup_bdi_name() new interface.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_BDI], [
+	AC_MSG_CHECKING([whether super_setup_bdi_name() exists])
+	ZFS_LINUX_TRY_COMPILE_SYMBOL([
+		#include <linux/fs.h>
+		struct super_block sb;
+	], [
+		char *name = "bdi";
+		int error __attribute__((unused)) =
+		    super_setup_bdi_name(&sb, name);
+	], [super_setup_bdi_name], [fs/super.c], [
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
+		    [super_setup_bdi_name() exits])
+	], [
+		AC_MSG_RESULT(no)
+		AC_MSG_CHECKING(
+		    [whether bdi_setup_and_register() wants 2 args])
+		ZFS_LINUX_TRY_COMPILE_SYMBOL([
+			#include <linux/backing-dev.h>
+			struct backing_dev_info bdi;
+		], [
+			char *name = "bdi";
+			int error __attribute__((unused)) =
+			    bdi_setup_and_register(&bdi, name);
+		], [bdi_setup_and_register], [mm/backing-dev.c], [
+			AC_MSG_RESULT(yes)
+			AC_DEFINE(HAVE_2ARGS_BDI_SETUP_AND_REGISTER, 1,
+			    [bdi_setup_and_register() wants 2 args])
+		], [
+			AC_MSG_RESULT(no)
+			AC_MSG_CHECKING(
+			    [whether bdi_setup_and_register() wants 3 args])
+			ZFS_LINUX_TRY_COMPILE_SYMBOL([
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
+			], [
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
+			], [bdi_setup_and_register], [mm/backing-dev.c], [
+				AC_MSG_RESULT(yes)
+				AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,
+				    [bdi_setup_and_register() wants 3 args])
+			], [
+				AC_MSG_RESULT(no)
+			])
+		])
+	])
+])
diff --git a/zfs/config/kernel-current-time.m4 b/zfs/config/kernel-current-time.m4
new file mode 100644
index 000000000000..2ede9ff38c41
--- /dev/null
+++ b/zfs/config/kernel-current-time.m4
@@ -0,0 +1,19 @@
+dnl #
+dnl # 4.9, current_time() added
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME],
+	[AC_MSG_CHECKING([whether current_time() exists])
+	ZFS_LINUX_TRY_COMPILE_SYMBOL([
+		#include <linux/fs.h>
+	], [
+		struct inode ip;
+		struct timespec now __attribute__ ((unused));
+
+		now = current_time(&ip);
+	], [current_time], [fs/inode.c], [
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists])
+	], [
+		AC_MSG_RESULT(no)
+	])
+])
diff --git a/zfs/config/kernel.m4 b/zfs/config/kernel.m4
index 9ca48a2c94b8..4a8eeab2ae10 100644
--- a/zfs/config/kernel.m4
+++ b/zfs/config/kernel.m4
@@ -96,7 +96,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
 	ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID
 	ZFS_AC_KERNEL_S_INSTANCES_LIST_HEAD
 	ZFS_AC_KERNEL_S_D_OP
-	ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER
+	ZFS_AC_KERNEL_BDI
 	ZFS_AC_KERNEL_SET_NLINK
 	ZFS_AC_KERNEL_ELEVATOR_CHANGE
 	ZFS_AC_KERNEL_5ARG_SGET
@@ -110,6 +110,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
 	ZFS_AC_KERNEL_GENERIC_IO_ACCT
 	ZFS_AC_KERNEL_RENAME_WANTS_FLAGS
 	ZFS_AC_KERNEL_HAVE_GENERIC_SETXATTR
+	ZFS_AC_KERNEL_CURRENT_TIME
 
 	AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
 		KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
diff --git a/zfs/configure b/zfs/configure
index 48e8e3277e79..dcfbfd580ff3 100755
--- a/zfs/configure
+++ b/zfs/configure
@@ -22974,16 +22974,16 @@ fi
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
-$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_setup_bdi_name() exists" >&5
+$as_echo_n "checking whether super_setup_bdi_name() exists... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/backing-dev.h>
-		struct backing_dev_info bdi;
+		#include <linux/fs.h>
+		struct super_block sb;
 
 int
 main (void)
@@ -22991,7 +22991,7 @@ main (void)
 
 		char *name = "bdi";
 		int error __attribute__((unused)) =
-		    bdi_setup_and_register(&bdi, name);
+		    super_setup_bdi_name(&sb, name);
 
   ;
   return 0;
@@ -23036,8 +23036,8 @@ fi
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
-$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
 
 
@@ -23052,9 +23052,8 @@ main (void)
 {
 
 			char *name = "bdi";
-			unsigned int cap = BDI_CAP_MAP_COPY;
 			int error __attribute__((unused)) =
-			    bdi_setup_and_register(&bdi, name, cap);
+			    bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -23099,6 +23098,69 @@ fi
 
 			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
+
+int
+main (void)
+{
+
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+	rm -Rf build
+
+
+	if test $rc -ne 0; then :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 	else
 		if test "x$enable_linux_builtin" != xyes; then
@@ -23129,12 +23191,12 @@ $as_echo "no" >&6; }
 		fi
 		if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		else :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
@@ -23173,9 +23235,9 @@ $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 		fi
 		if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
 $as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
@@ -23183,17 +23245,17 @@ $as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-			#include <linux/backing-dev.h>
-			struct backing_dev_info bdi;
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-			char *name = "bdi";
-			unsigned int cap = BDI_CAP_MAP_COPY;
-			int error __attribute__((unused)) =
-			    bdi_setup_and_register(&bdi, name, cap);
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -23236,7 +23298,7 @@ fi
 
 	if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 	else
@@ -23268,12 +23330,12 @@ $as_echo "no" >&6; }
 		fi
 		if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		else :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
@@ -23285,7 +23347,7 @@ $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 
 		else :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
@@ -23295,23 +23357,55 @@ $as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 	fi
 
 
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]super_setup_bdi_name[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/super.c; do
+			grep -q -E "EXPORT_SYMBOL.*(super_setup_bdi_name)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
+
+		fi
+		if test $rc -ne 0; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5
-$as_echo_n "checking whether set_nlink() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+			#include <linux/backing-dev.h>
+			struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		struct inode node;
-		unsigned int link = 0;
-		(void) set_nlink(&node, link);
+			char *name = "bdi";
+			int error __attribute__((unused)) =
+			    bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -23341,48 +23435,40 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_SET_NLINK 1" >>confdefs.h
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
 	rm -Rf build
 
 
+	if test $rc -ne 0; then :
 
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether elevator_change() is available" >&5
-$as_echo_n "checking whether elevator_change() is available... " >&6; }
-	tmp_flags="$EXTRA_KCFLAGS"
-	EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/blkdev.h>
-		#include <linux/elevator.h>
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		int ret;
-		struct request_queue *q = NULL;
-		char *elevator = NULL;
-		ret = elevator_change(q, elevator);
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -23412,47 +23498,116 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_ELEVATOR_CHANGE 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+	else
+		if test "x$enable_linux_builtin" != xyes; then
 
+	grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in mm/backing-dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
-fi
-	rm -Rf build
+		fi
+		if test $rc -ne 0; then :
 
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-	EXTRA_KCFLAGS="$tmp_flags"
+		else :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in mm/backing-dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
+
+		fi
+		if test $rc -ne 0; then :
+
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sget() wants 5 args" >&5
-$as_echo_n "checking whether sget() wants 5 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		struct file_system_type *type = NULL;
-		int (*test)(struct super_block *,void *) = NULL;
-		int (*set)(struct super_block *,void *) = NULL;
-		int flags = 0;
-		void *data = NULL;
-		(void) sget(type, test, set, flags, data);
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -23482,19 +23637,290 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_5ARG_SGET 1" >>confdefs.h
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+
+fi
+	rm -Rf build
+
+
+	if test $rc -ne 0; then :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in mm/backing-dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
+
+		fi
+		if test $rc -ne 0; then :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+		else :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+		else :
+
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+		else :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_SUPER_SETUP_BDI_NAME 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5
+$as_echo_n "checking whether set_nlink() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#include <linux/fs.h>
+
+int
+main (void)
+{
+
+		struct inode node;
+		unsigned int link = 0;
+		(void) set_nlink(&node, link);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_SET_NLINK 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether elevator_change() is available" >&5
+$as_echo_n "checking whether elevator_change() is available... " >&6; }
+	tmp_flags="$EXTRA_KCFLAGS"
+	EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#include <linux/blkdev.h>
+		#include <linux/elevator.h>
+
+int
+main (void)
+{
+
+		int ret;
+		struct request_queue *q = NULL;
+		char *elevator = NULL;
+		ret = elevator_change(q, elevator);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_ELEVATOR_CHANGE 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+	rm -Rf build
+
+
+	EXTRA_KCFLAGS="$tmp_flags"
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sget() wants 5 args" >&5
+$as_echo_n "checking whether sget() wants 5 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#include <linux/fs.h>
+
+int
+main (void)
+{
+
+		struct file_system_type *type = NULL;
+		int (*test)(struct super_block *,void *) = NULL;
+		int (*set)(struct super_block *,void *) = NULL;
+		int flags = 0;
+		void *data = NULL;
+		(void) sget(type, test, set, flags, data);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_5ARG_SGET 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -24473,7 +24899,77 @@ _ACEOF
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_RENAME_WANTS_FLAGS 1" >>confdefs.h
+$as_echo "#define HAVE_RENAME_WANTS_FLAGS 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_setxattr() exists" >&5
+$as_echo_n "checking whether generic_setxattr() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#include <linux/fs.h>
+		#include <linux/xattr.h>
+
+		static const struct inode_operations
+		    iops __attribute__ ((unused)) = {
+			.setxattr = generic_setxattr
+		};
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_GENERIC_SETXATTR 1" >>confdefs.h
 
 
 else
@@ -24490,26 +24986,24 @@ fi
 
 
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_time() exists" >&5
+$as_echo_n "checking whether current_time() exists... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_setxattr() exists" >&5
-$as_echo_n "checking whether generic_setxattr() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
 		#include <linux/fs.h>
-		#include <linux/xattr.h>
-
-		static const struct inode_operations
-		    iops __attribute__ ((unused)) = {
-			.setxattr = generic_setxattr
-		};
 
 int
 main (void)
 {
 
+		struct inode ip;
+		struct timespec now __attribute__ ((unused));
+
+		now = current_time(&ip);
 
   ;
   return 0;
@@ -24539,25 +25033,64 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_GENERIC_SETXATTR 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]current_time[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/inode.c; do
+			grep -q -E "EXPORT_SYMBOL.*(current_time)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
+
+		fi
+		if test $rc -ne 0; then :
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+		else :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_CURRENT_TIME 1" >>confdefs.h
 
-fi
-	rm -Rf build
 
+		fi
+	fi
 
 
 
@@ -31883,24 +32416,220 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_FOLLOW_LINK_NAMEIDATA 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                        as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#if !defined(HAVE_GET_LINK_DELAYED)
+		#error "Expecting get_link() delayed done"
+		#endif
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+
+$as_echo "#define HAVE_PUT_LINK_DELAYED 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+										{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes cookie" >&5
+$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+			#include <linux/fs.h>
+			void put_link(struct inode *ip, void *cookie)
+			    { return; }
+			static struct inode_operations
+			    iops __attribute__ ((unused)) = {
+				.put_link = put_link,
+			};
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_PUT_LINK_COOKIE 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+												{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+				#include <linux/fs.h>
+				void put_link(struct dentry *de, struct
+				    nameidata *nd, void *ptr) { return; }
+				static struct inode_operations
+				    iops __attribute__ ((unused)) = {
+					.put_link = put_link,
+				};
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FOLLOW_LINK_NAMEIDATA 1" >>confdefs.h
+$as_echo "#define HAVE_PUT_LINK_NAMEIDATA 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                        as_fn_error $? "no; please file a bug report" "$LINENO" 5
-
-
-
-fi
-	rm -Rf build
-
-
+				as_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
 
@@ -31911,7 +32640,6 @@ fi
 
 
 
-
 fi
 	rm -Rf build
 
@@ -31925,14 +32653,19 @@ fi
 
 
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->truncate_range() exists" >&5
+$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#if !defined(HAVE_GET_LINK_DELAYED)
-		#error "Expecting get_link() delayed done"
-		#endif
+		#include <linux/fs.h>
+		void truncate_range(struct inode *inode, loff_t start,
+		                    loff_t end) { return; }
+		static struct inode_operations iops __attribute__ ((unused)) = {
+			.truncate_range	= truncate_range,
+		};
 
 int
 main (void)
@@ -31968,28 +32701,39 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PUT_LINK_DELAYED 1" >>confdefs.h
+$as_echo "#define HAVE_INODE_TRUNCATE_RANGE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-										{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes cookie" >&5
-$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5
+$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-			#include <linux/fs.h>
-			void put_link(struct inode *ip, void *cookie)
-			    { return; }
-			static struct inode_operations
-			    iops __attribute__ ((unused)) = {
-				.put_link = put_link,
-			};
+		#include <linux/dcache.h>
+		struct vfsmount *d_automount(struct path *p) { return NULL; }
+		struct dentry_operations dops __attribute__ ((unused)) = {
+			.d_automount = d_automount,
+		};
 
 int
 main (void)
@@ -32025,32 +32769,40 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PUT_LINK_COOKIE 1" >>confdefs.h
+$as_echo "#define HAVE_AUTOMOUNT 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-												{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes nameidata" >&5
-$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
+
+
+
+fi
+	rm -Rf build
+
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->encode_fh() wants inode" >&5
+$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-				#include <linux/fs.h>
-				void put_link(struct dentry *de, struct
-				    nameidata *nd, void *ptr) { return; }
-				static struct inode_operations
-				    iops __attribute__ ((unused)) = {
-					.put_link = put_link,
-				};
+		#include <linux/exportfs.h>
+		int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
+		              struct inode *parent) { return 0; }
+		static struct export_operations eops __attribute__ ((unused))={
+			.encode_fh = encode_fh,
+		};
 
 int
 main (void)
@@ -32086,17 +32838,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PUT_LINK_NAMEIDATA 1" >>confdefs.h
+$as_echo "#define HAVE_ENCODE_FH_WITH_INODE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-				as_fn_error $? "no; please file a bug report" "$LINENO" 5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -32106,11 +32859,65 @@ fi
 
 
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5
+$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
+
 
-fi
-	rm -Rf build
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#include <linux/exportfs.h>
+		int commit_metadata(struct inode *inode) { return 0; }
+		static struct export_operations eops __attribute__ ((unused))={
+			.commit_metadata = commit_metadata,
+		};
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
 
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_COMMIT_METADATA 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -32119,25 +32926,21 @@ fi
 
 
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clear_inode() is available" >&5
+$as_echo_n "checking whether clear_inode() is available... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->truncate_range() exists" >&5
-$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
 		#include <linux/fs.h>
-		void truncate_range(struct inode *inode, loff_t start,
-		                    loff_t end) { return; }
-		static struct inode_operations iops __attribute__ ((unused)) = {
-			.truncate_range	= truncate_range,
-		};
 
 int
 main (void)
 {
 
+		clear_inode(NULL);
 
   ;
   return 0;
@@ -32167,45 +32970,85 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_INODE_TRUNCATE_RANGE 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/inode.c; do
+			grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
+
+		fi
+		if test $rc -ne 0; then :
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+		else :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-	rm -Rf build
+$as_echo "#define HAVE_CLEAR_INODE 1" >>confdefs.h
 
 
+		fi
+	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5
-$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available" >&5
+$as_echo_n "checking whether setattr_prepare() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/dcache.h>
-		struct vfsmount *d_automount(struct path *p) { return NULL; }
-		struct dentry_operations dops __attribute__ ((unused)) = {
-			.d_automount = d_automount,
-		};
+		#include <linux/fs.h>
 
 int
 main (void)
 {
 
+		struct dentry *dentry = NULL;
+		struct iattr *attr = NULL;
+		int error;
+
+		error = setattr_prepare(dentry, attr);
 
   ;
   return 0;
@@ -32235,46 +33078,81 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+	rm -Rf build
+
+
+	if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-$as_echo "#define HAVE_AUTOMOUNT 1" >>confdefs.h
+	else
+		if test "x$enable_linux_builtin" != xyes; then
 
+	grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/attr.c; do
+			grep -q -E "EXPORT_SYMBOL.*(setattr_prepare)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+		fi
+		if test $rc -ne 0; then :
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+		else :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-	rm -Rf build
+$as_echo "#define HAVE_SETATTR_PREPARE 1" >>confdefs.h
 
 
+		fi
+	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->encode_fh() wants inode" >&5
-$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5
+$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/exportfs.h>
-		int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
-		              struct inode *parent) { return 0; }
-		static struct export_operations eops __attribute__ ((unused))={
-			.encode_fh = encode_fh,
-		};
+		#include <linux/fs.h>
 
 int
 main (void)
 {
 
+		insert_inode_locked(NULL);
 
   ;
   return 0;
@@ -32304,45 +33182,81 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_ENCODE_FH_WITH_INODE 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+	else
+		if test "x$enable_linux_builtin" != xyes; then
 
+	grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/inode.c; do
+			grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
-fi
-	rm -Rf build
+		fi
+		if test $rc -ne 0; then :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+		else :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_INSERT_INODE_LOCKED 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_make_root() is available" >&5
+$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5
-$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/exportfs.h>
-		int commit_metadata(struct inode *inode) { return 0; }
-		static struct export_operations eops __attribute__ ((unused))={
-			.commit_metadata = commit_metadata,
-		};
+		#include <linux/dcache.h>
 
 int
 main (void)
 {
 
+		d_make_root(NULL);
 
   ;
   return 0;
@@ -32372,42 +33286,81 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_COMMIT_METADATA 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+	else
+		if test "x$enable_linux_builtin" != xyes; then
 
+	grep -q -E '[[:space:]]d_make_root[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/dcache.c; do
+			grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
-fi
-	rm -Rf build
+		fi
+		if test $rc -ne 0; then :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+		else :
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clear_inode() is available" >&5
-$as_echo_n "checking whether clear_inode() is available... " >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_D_MAKE_ROOT 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_obtain_alias() is available" >&5
+$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+		#include <linux/dcache.h>
 
 int
 main (void)
 {
 
-		clear_inode(NULL);
+		d_obtain_alias(NULL);
 
   ;
   return 0;
@@ -32456,13 +33409,13 @@ $as_echo "no" >&6; }
 	else
 		if test "x$enable_linux_builtin" != xyes; then
 
-	grep -q -E '[[:space:]]clear_inode[[:space:]]' \
+	grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
 		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
 	rc=$?
 	if test $rc -ne 0; then
 		export=0
-		for file in fs/inode.c; do
-			grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
+		for file in fs/dcache.c; do
+			grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
 				"$LINUX/$file" 2>/dev/null
 			rc=$?
 			if test $rc -eq 0; then
@@ -32490,32 +33443,29 @@ $as_echo "no" >&6; }
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CLEAR_INODE 1" >>confdefs.h
+$as_echo "#define HAVE_D_OBTAIN_ALIAS 1" >>confdefs.h
 
 
 		fi
 	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available" >&5
-$as_echo_n "checking whether setattr_prepare() is available... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_prune_aliases() is available" >&5
+$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+		#include <linux/dcache.h>
 
 int
 main (void)
 {
 
-		struct dentry *dentry = NULL;
-		struct iattr *attr = NULL;
-		int error;
-
-		error = setattr_prepare(dentry, attr);
+		struct inode *ip = NULL;
+		d_prune_aliases(ip);
 
   ;
   return 0;
@@ -32564,13 +33514,13 @@ $as_echo "no" >&6; }
 	else
 		if test "x$enable_linux_builtin" != xyes; then
 
-	grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \
+	grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
 		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
 	rc=$?
 	if test $rc -ne 0; then
 		export=0
-		for file in fs/attr.c; do
-			grep -q -E "EXPORT_SYMBOL.*(setattr_prepare)" \
+		for file in fs/dcache.c; do
+			grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
 				"$LINUX/$file" 2>/dev/null
 			rc=$?
 			if test $rc -eq 0; then
@@ -32598,28 +33548,28 @@ $as_echo "no" >&6; }
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_SETATTR_PREPARE 1" >>confdefs.h
+$as_echo "#define HAVE_D_PRUNE_ALIASES 1" >>confdefs.h
 
 
 		fi
 	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5
-$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_set_d_op() is available" >&5
+$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+		#include <linux/dcache.h>
 
 int
 main (void)
 {
 
-		insert_inode_locked(NULL);
+		d_set_d_op(NULL, NULL);
 
   ;
   return 0;
@@ -32668,13 +33618,13 @@ $as_echo "no" >&6; }
 	else
 		if test "x$enable_linux_builtin" != xyes; then
 
-	grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
+	grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
 		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
 	rc=$?
 	if test $rc -ne 0; then
 		export=0
-		for file in fs/inode.c; do
-			grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
+		for file in fs/dcache.c; do
+			grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
 				"$LINUX/$file" 2>/dev/null
 			rc=$?
 			if test $rc -eq 0; then
@@ -32702,16 +33652,16 @@ $as_echo "no" >&6; }
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_INSERT_INODE_LOCKED 1" >>confdefs.h
+$as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h
 
 
 		fi
 	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_make_root() is available" >&5
-$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes struct nameidata" >&5
+$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -32719,11 +33669,18 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
 		#include <linux/dcache.h>
 
+		int revalidate (struct dentry *dentry,
+		    struct nameidata *nidata) { return 0; }
+
+		static const struct dentry_operations
+		    dops __attribute__ ((unused)) = {
+			.d_revalidate	= revalidate,
+		};
+
 int
 main (void)
 {
 
-		d_make_root(NULL);
 
   ;
   return 0;
@@ -32753,69 +33710,30 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
 
-fi
-	rm -Rf build
-
-
-	if test $rc -ne 0; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-	else
-		if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define HAVE_D_REVALIDATE_NAMEIDATA 1" >>confdefs.h
 
-	grep -q -E '[[:space:]]d_make_root[[:space:]]' \
-		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-	rc=$?
-	if test $rc -ne 0; then
-		export=0
-		for file in fs/dcache.c; do
-			grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
-				"$LINUX/$file" 2>/dev/null
-			rc=$?
-			if test $rc -eq 0; then
-				export=1
-				break;
-			fi
-		done
-		if test $export -eq 0; then :
-			rc=1
-		else :
-			rc=0
-		fi
-	else :
-		rc=0
-	fi
 
-		fi
-		if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-		else :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_MAKE_ROOT 1" >>confdefs.h
 
+fi
+	rm -Rf build
 
-		fi
-	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_obtain_alias() is available" >&5
-$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dentry uses const struct dentry_operations" >&5
+$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -32823,11 +33741,17 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
 		#include <linux/dcache.h>
 
+		const struct dentry_operations test_d_op = {
+			.d_revalidate = NULL,
+		};
+
 int
 main (void)
 {
 
-		d_obtain_alias(NULL);
+		struct dentry d __attribute__ ((unused));
+
+		d.d_op = &test_d_op;
 
   ;
   return 0;
@@ -32857,82 +33781,42 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-	rm -Rf build
-
-
-	if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-	else
-		if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define HAVE_CONST_DENTRY_OPERATIONS 1" >>confdefs.h
 
-	grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
-		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-	rc=$?
-	if test $rc -ne 0; then
-		export=0
-		for file in fs/dcache.c; do
-			grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
-				"$LINUX/$file" 2>/dev/null
-			rc=$?
-			if test $rc -eq 0; then
-				export=1
-				break;
-			fi
-		done
-		if test $export -eq 0; then :
-			rc=1
-		else :
-			rc=0
-		fi
-	else :
-		rc=0
-	fi
 
-		fi
-		if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-		else :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_OBTAIN_ALIAS 1" >>confdefs.h
 
+fi
+	rm -Rf build
 
-		fi
-	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_prune_aliases() is available" >&5
-$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether check_disk_size_change() is available" >&5
+$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/dcache.h>
+		#include <linux/fs.h>
 
 int
 main (void)
 {
 
-		struct inode *ip = NULL;
-		d_prune_aliases(ip);
+		check_disk_size_change(NULL, NULL);
 
   ;
   return 0;
@@ -32981,13 +33865,13 @@ $as_echo "no" >&6; }
 	else
 		if test "x$enable_linux_builtin" != xyes; then
 
-	grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
+	grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
 		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
 	rc=$?
 	if test $rc -ne 0; then
 		export=0
-		for file in fs/dcache.c; do
-			grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
+		for file in fs/block_dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
 				"$LINUX/$file" 2>/dev/null
 			rc=$?
 			if test $rc -eq 0; then
@@ -33015,28 +33899,28 @@ $as_echo "no" >&6; }
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_PRUNE_ALIASES 1" >>confdefs.h
+$as_echo "#define HAVE_CHECK_DISK_SIZE_CHANGE 1" >>confdefs.h
 
 
 		fi
 	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_set_d_op() is available" >&5
-$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5
+$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/dcache.h>
+		#include <linux/mm.h>
 
 int
 main (void)
 {
 
-		d_set_d_op(NULL, NULL);
+		truncate_setsize(NULL, 0);
 
   ;
   return 0;
@@ -33085,13 +33969,13 @@ $as_echo "no" >&6; }
 	else
 		if test "x$enable_linux_builtin" != xyes; then
 
-	grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
+	grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
 		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
 	rc=$?
 	if test $rc -ne 0; then
 		export=0
-		for file in fs/dcache.c; do
-			grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
+		for file in mm/truncate.c; do
+			grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
 				"$LINUX/$file" 2>/dev/null
 			rc=$?
 			if test $rc -eq 0; then
@@ -33119,7 +34003,7 @@ $as_echo "no" >&6; }
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h
+$as_echo "#define HAVE_TRUNCATE_SETSIZE 1" >>confdefs.h
 
 
 		fi
@@ -33127,27 +34011,27 @@ $as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes struct nameidata" >&5
-$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants 6 args" >&5
+$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/dcache.h>
-
-		int revalidate (struct dentry *dentry,
-		    struct nameidata *nidata) { return 0; }
-
-		static const struct dentry_operations
-		    dops __attribute__ ((unused)) = {
-			.d_revalidate	= revalidate,
-		};
+		#include <linux/security.h>
 
 int
 main (void)
 {
 
+		struct inode *ip __attribute__ ((unused)) = NULL;
+		struct inode *dip __attribute__ ((unused)) = NULL;
+		const struct qstr *str __attribute__ ((unused)) = NULL;
+		char *name __attribute__ ((unused)) = NULL;
+		void *value __attribute__ ((unused)) = NULL;
+		size_t len __attribute__ ((unused)) = 0;
+
+		security_inode_init_security(ip, dip, str, &name, &value, &len);
 
   ;
   return 0;
@@ -33181,7 +34065,7 @@ _ACEOF
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_REVALIDATE_NAMEIDATA 1" >>confdefs.h
+$as_echo "#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
 
 
 else
@@ -33199,26 +34083,25 @@ fi
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dentry uses const struct dentry_operations" >&5
-$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5
+$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/dcache.h>
-
-		const struct dentry_operations test_d_op = {
-			.d_revalidate = NULL,
-		};
+		#include <linux/security.h>
 
 int
 main (void)
 {
 
-		struct dentry d __attribute__ ((unused));
+		struct inode *ip __attribute__ ((unused)) = NULL;
+		struct inode *dip __attribute__ ((unused)) = NULL;
+		const struct qstr *str __attribute__ ((unused)) = NULL;
+		initxattrs func __attribute__ ((unused)) = NULL;
 
-		d.d_op = &test_d_op;
+		security_inode_init_security(ip, dip, str, func, NULL);
 
   ;
   return 0;
@@ -33252,7 +34135,7 @@ _ACEOF
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CONST_DENTRY_OPERATIONS 1" >>confdefs.h
+$as_echo "#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
 
 
 else
@@ -33269,8 +34152,8 @@ fi
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether check_disk_size_change() is available" >&5
-$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mount_nodev() is available" >&5
+$as_echo_n "checking whether mount_nodev() is available... " >&6; }
 
 
 
@@ -33283,7 +34166,7 @@ int
 main (void)
 {
 
-		check_disk_size_change(NULL, NULL);
+		mount_nodev(NULL, 0, NULL, NULL);
 
   ;
   return 0;
@@ -33332,13 +34215,13 @@ $as_echo "no" >&6; }
 	else
 		if test "x$enable_linux_builtin" != xyes; then
 
-	grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
+	grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
 		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
 	rc=$?
 	if test $rc -ne 0; then
 		export=0
-		for file in fs/block_dev.c; do
-			grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
+		for file in fs/super.c; do
+			grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
 				"$LINUX/$file" 2>/dev/null
 			rc=$?
 			if test $rc -eq 0; then
@@ -33366,28 +34249,37 @@ $as_echo "no" >&6; }
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CHECK_DISK_SIZE_CHANGE 1" >>confdefs.h
+$as_echo "#define HAVE_MOUNT_NODEV 1" >>confdefs.h
 
 
 		fi
 	fi
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5
-$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5
+$as_echo_n "checking whether super_block has s_shrink... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/mm.h>
+		#include <linux/fs.h>
+
+		int shrink(struct shrinker *s, struct shrink_control *sc)
+		    { return 0; }
+
+		static const struct super_block
+		    sb __attribute__ ((unused)) = {
+			.s_shrink.shrink = shrink,
+			.s_shrink.seeks = DEFAULT_SEEKS,
+			.s_shrink.batch = 0,
+		};
 
 int
 main (void)
 {
 
-		truncate_setsize(NULL, 0);
 
   ;
   return 0;
@@ -33417,88 +34309,45 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-	rm -Rf build
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-	if test $rc -ne 0; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-	else
-		if test "x$enable_linux_builtin" != xyes; then
-
-	grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
-		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-	rc=$?
-	if test $rc -ne 0; then
-		export=0
-		for file in mm/truncate.c; do
-			grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
-				"$LINUX/$file" 2>/dev/null
-			rc=$?
-			if test $rc -eq 0; then
-				export=1
-				break;
-			fi
-		done
-		if test $export -eq 0; then :
-			rc=1
-		else :
-			rc=0
-		fi
-	else :
-		rc=0
-	fi
+$as_echo "#define HAVE_SHRINK 1" >>confdefs.h
 
-		fi
-		if test $rc -ne 0; then :
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-		else :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_TRUNCATE_SETSIZE 1" >>confdefs.h
 
+fi
+	rm -Rf build
 
-		fi
-	fi
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants 6 args" >&5
-$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shrink_control has nid" >&5
+$as_echo_n "checking whether shrink_control has nid... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/security.h>
+		#include <linux/fs.h>
 
 int
 main (void)
 {
 
-		struct inode *ip __attribute__ ((unused)) = NULL;
-		struct inode *dip __attribute__ ((unused)) = NULL;
-		const struct qstr *str __attribute__ ((unused)) = NULL;
-		char *name __attribute__ ((unused)) = NULL;
-		void *value __attribute__ ((unused)) = NULL;
-		size_t len __attribute__ ((unused)) = 0;
-
-		security_inode_init_security(ip, dip, str, &name, &value, &len);
+		struct shrink_control sc __attribute__ ((unused));
+		unsigned long scnidsize __attribute__ ((unused)) =
+		    sizeof(sc.nid);
 
   ;
   return 0;
@@ -33532,7 +34381,7 @@ _ACEOF
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
+$as_echo "#define SHRINK_CONTROL_HAS_NID 1" >>confdefs.h
 
 
 else
@@ -33550,25 +34399,22 @@ fi
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5
-$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_instances list_head" >&5
+$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/security.h>
+		#include <linux/fs.h>
 
 int
 main (void)
 {
 
-		struct inode *ip __attribute__ ((unused)) = NULL;
-		struct inode *dip __attribute__ ((unused)) = NULL;
-		const struct qstr *str __attribute__ ((unused)) = NULL;
-		initxattrs func __attribute__ ((unused)) = NULL;
+		struct super_block sb __attribute__ ((unused));
 
-		security_inode_init_security(ip, dip, str, func, NULL);
+		INIT_LIST_HEAD(&sb.s_instances);
 
   ;
   return 0;
@@ -33602,7 +34448,7 @@ _ACEOF
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
+$as_echo "#define HAVE_S_INSTANCES_LIST_HEAD 1" >>confdefs.h
 
 
 else
@@ -33619,9 +34465,8 @@ fi
 
 
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mount_nodev() is available" >&5
-$as_echo_n "checking whether mount_nodev() is available... " >&6; }
-
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_d_op" >&5
+$as_echo_n "checking whether super_block has s_d_op... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -33633,7 +34478,8 @@ int
 main (void)
 {
 
-		mount_nodev(NULL, 0, NULL, NULL);
+		struct super_block sb __attribute__ ((unused));
+		sb.s_d_op = NULL;
 
   ;
   return 0;
@@ -33663,90 +34509,46 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-	rm -Rf build
-
-
-	if test $rc -ne 0; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-	else
-		if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define HAVE_S_D_OP 1" >>confdefs.h
 
-	grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
-		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-	rc=$?
-	if test $rc -ne 0; then
-		export=0
-		for file in fs/super.c; do
-			grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
-				"$LINUX/$file" 2>/dev/null
-			rc=$?
-			if test $rc -eq 0; then
-				export=1
-				break;
-			fi
-		done
-		if test $export -eq 0; then :
-			rc=1
-		else :
-			rc=0
-		fi
-	else :
-		rc=0
-	fi
 
-		fi
-		if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-		else :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_MOUNT_NODEV 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-		fi
-	fi
 
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_setup_bdi_name() exists" >&5
+$as_echo_n "checking whether super_setup_bdi_name() exists... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5
-$as_echo_n "checking whether super_block has s_shrink... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
 		#include <linux/fs.h>
-
-		int shrink(struct shrinker *s, struct shrink_control *sc)
-		    { return 0; }
-
-		static const struct super_block
-		    sb __attribute__ ((unused)) = {
-			.s_shrink.shrink = shrink,
-			.s_shrink.seeks = DEFAULT_SEEKS,
-			.s_shrink.batch = 0,
-		};
+		struct super_block sb;
 
 int
 main (void)
 {
 
+		char *name = "bdi";
+		int error __attribute__((unused)) =
+		    super_setup_bdi_name(&sb, name);
 
   ;
   return 0;
@@ -33776,45 +34578,39 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_SHRINK 1" >>confdefs.h
-
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
 	rm -Rf build
 
 
+	if test $rc -ne 0; then :
 
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shrink_control has nid" >&5
-$as_echo_n "checking whether shrink_control has nid... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+			#include <linux/backing-dev.h>
+			struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		struct shrink_control sc __attribute__ ((unused));
-		unsigned long scnidsize __attribute__ ((unused)) =
-		    sizeof(sc.nid);
+			char *name = "bdi";
+			int error __attribute__((unused)) =
+			    bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -33844,44 +34640,40 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define SHRINK_CONTROL_HAS_NID 1" >>confdefs.h
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
 	rm -Rf build
 
 
+	if test $rc -ne 0; then :
 
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_instances list_head" >&5
-$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		struct super_block sb __attribute__ ((unused));
-
-		INIT_LIST_HEAD(&sb.s_instances);
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -33911,42 +34703,116 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_S_INSTANCES_LIST_HEAD 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in mm/backing-dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
+		fi
+		if test $rc -ne 0; then :
 
-fi
-	rm -Rf build
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+		else :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in mm/backing-dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
+		fi
+		if test $rc -ne 0; then :
 
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_d_op" >&5
-$as_echo_n "checking whether super_block has s_d_op... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/fs.h>
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		struct super_block sb __attribute__ ((unused));
-		sb.s_d_op = NULL;
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -33976,29 +34842,110 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_S_D_OP 1" >>confdefs.h
+fi
+	rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+	if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in mm/backing-dev.c; do
+			grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
+		fi
+		if test $rc -ne 0; then :
 
-fi
-	rm -Rf build
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+		else :
+
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+		else :
+
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]super_setup_bdi_name[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/super.c; do
+			grep -q -E "EXPORT_SYMBOL.*(super_setup_bdi_name)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
 
+		fi
+		if test $rc -ne 0; then :
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
 $as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
 
@@ -34006,16 +34953,16 @@ $as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-		#include <linux/backing-dev.h>
-		struct backing_dev_info bdi;
+			#include <linux/backing-dev.h>
+			struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-		char *name = "bdi";
-		int error __attribute__((unused)) =
-		    bdi_setup_and_register(&bdi, name);
+			char *name = "bdi";
+			int error __attribute__((unused)) =
+			    bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -34058,9 +35005,9 @@ fi
 
 	if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
 $as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
@@ -34068,17 +35015,17 @@ $as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-			#include <linux/backing-dev.h>
-			struct backing_dev_info bdi;
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-			char *name = "bdi";
-			unsigned int cap = BDI_CAP_MAP_COPY;
-			int error __attribute__((unused)) =
-			    bdi_setup_and_register(&bdi, name, cap);
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -34121,7 +35068,7 @@ fi
 
 	if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 	else
@@ -34153,12 +35100,12 @@ $as_echo "no" >&6; }
 		fi
 		if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		else :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
@@ -34197,9 +35144,9 @@ $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 		fi
 		if test $rc -ne 0; then :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
 $as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
@@ -34207,17 +35154,17 @@ $as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-			#include <linux/backing-dev.h>
-			struct backing_dev_info bdi;
+				#include <linux/backing-dev.h>
+				struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-			char *name = "bdi";
-			unsigned int cap = BDI_CAP_MAP_COPY;
-			int error __attribute__((unused)) =
-			    bdi_setup_and_register(&bdi, name, cap);
+				char *name = "bdi";
+				unsigned int cap = BDI_CAP_MAP_COPY;
+				int error __attribute__((unused)) =
+				    bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -34260,7 +35207,7 @@ fi
 
 	if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 	else
@@ -34292,12 +35239,12 @@ $as_echo "no" >&6; }
 		fi
 		if test $rc -ne 0; then :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		else :
 
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
@@ -34309,7 +35256,7 @@ $as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 
 		else :
 
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 $as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
@@ -34319,6 +35266,18 @@ $as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 	fi
 
 
+		else :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_SUPER_SETUP_BDI_NAME 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5
 $as_echo_n "checking whether set_nlink() is available... " >&6; }
@@ -35584,6 +36543,113 @@ fi
 
 
 
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_time() exists" >&5
+$as_echo_n "checking whether current_time() exists... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+		#include <linux/fs.h>
+
+int
+main (void)
+{
+
+		struct inode ip;
+		struct timespec now __attribute__ ((unused));
+
+		now = current_time(&ip);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+	rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+	echo "obj-m := conftest.o" >build/Makefile
+	modpost_flag=''
+	test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+	if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
+fi
+	rm -Rf build
+
+
+	if test $rc -ne 0; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+	else
+		if test "x$enable_linux_builtin" != xyes; then
+
+	grep -q -E '[[:space:]]current_time[[:space:]]' \
+		$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+	rc=$?
+	if test $rc -ne 0; then
+		export=0
+		for file in fs/inode.c; do
+			grep -q -E "EXPORT_SYMBOL.*(current_time)" \
+				"$LINUX/$file" 2>/dev/null
+			rc=$?
+			if test $rc -eq 0; then
+				export=1
+				break;
+			fi
+		done
+		if test $export -eq 0; then :
+			rc=1
+		else :
+			rc=0
+		fi
+	else :
+		rc=0
+	fi
+
+		fi
+		if test $rc -ne 0; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+		else :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_CURRENT_TIME 1" >>confdefs.h
+
+
+		fi
+	fi
+
+
 
 	if test "$LINUX_OBJ" != "$LINUX"; then :
 
diff --git a/zfs/include/Makefile.in b/zfs/include/Makefile.in
index 565636026926..241eca98c583 100644
--- a/zfs/include/Makefile.in
+++ b/zfs/include/Makefile.in
@@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/include/linux/Makefile.in b/zfs/include/linux/Makefile.in
index 5190f79a8f82..794ee975ab1c 100644
--- a/zfs/include/linux/Makefile.in
+++ b/zfs/include/linux/Makefile.in
@@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/include/linux/vfs_compat.h b/zfs/include/linux/vfs_compat.h
index a0475070b405..a859b7c649c8 100644
--- a/zfs/include/linux/vfs_compat.h
+++ b/zfs/include/linux/vfs_compat.h
@@ -69,45 +69,115 @@ truncate_setsize(struct inode *ip, loff_t new)
 /*
  * 2.6.32 - 2.6.33, bdi_setup_and_register() is not available.
  * 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
- * 4.0 - x.y, bdi_setup_and_register() takes 2 arguments.
+ * 4.0 - 4.11, bdi_setup_and_register() takes 2 arguments.
+ * 4.12 - x.y, super_setup_bdi_name() new interface.
  */
-#if defined(HAVE_2ARGS_BDI_SETUP_AND_REGISTER)
+#if defined(HAVE_SUPER_SETUP_BDI_NAME)
+extern atomic_long_t zfs_bdi_seq;
+
+static inline int
+zpl_bdi_setup(struct super_block *sb, char *name)
+{
+	return super_setup_bdi_name(sb, "%.28s-%ld", name,
+		atomic_long_inc_return(&zfs_bdi_seq));
+}
+static inline void
+zpl_bdi_destroy(struct super_block *sb)
+{
+}
+#elif defined(HAVE_2ARGS_BDI_SETUP_AND_REGISTER)
 static inline int
-zpl_bdi_setup_and_register(struct backing_dev_info *bdi, char *name)
+zpl_bdi_setup(struct super_block *sb, char *name)
+{
+	struct backing_dev_info *bdi;
+	int error;
+
+	bdi = kmem_zalloc(sizeof (struct backing_dev_info), KM_SLEEP);
+	error = bdi_setup_and_register(bdi, name);
+	if (error) {
+		kmem_free(bdi, sizeof (struct backing_dev_info));
+		return (error);
+	}
+
+	sb->s_bdi = bdi;
+
+	return (0);
+}
+static inline void
+zpl_bdi_destroy(struct super_block *sb)
 {
-	return (bdi_setup_and_register(bdi, name));
+	struct backing_dev_info *bdi = sb->s_bdi;
+
+	bdi_destroy(bdi);
+	kmem_free(bdi, sizeof (struct backing_dev_info));
+	sb->s_bdi = NULL;
 }
 #elif defined(HAVE_3ARGS_BDI_SETUP_AND_REGISTER)
 static inline int
-zpl_bdi_setup_and_register(struct backing_dev_info *bdi, char *name)
+zpl_bdi_setup(struct super_block *sb, char *name)
 {
-	return (bdi_setup_and_register(bdi, name, BDI_CAP_MAP_COPY));
+	struct backing_dev_info *bdi;
+	int error;
+
+	bdi = kmem_zalloc(sizeof (struct backing_dev_info), KM_SLEEP);
+	error = bdi_setup_and_register(bdi, name, BDI_CAP_MAP_COPY);
+	if (error) {
+		kmem_free(sb->s_bdi, sizeof (struct backing_dev_info));
+		return (error);
+	}
+
+	sb->s_bdi = bdi;
+
+	return (0);
+}
+static inline void
+zpl_bdi_destroy(struct super_block *sb)
+{
+	struct backing_dev_info *bdi = sb->s_bdi;
+
+	bdi_destroy(bdi);
+	kmem_free(bdi, sizeof (struct backing_dev_info));
+	sb->s_bdi = NULL;
 }
 #else
 extern atomic_long_t zfs_bdi_seq;
 
 static inline int
-zpl_bdi_setup_and_register(struct backing_dev_info *bdi, char *name)
+zpl_bdi_setup(struct super_block *sb, char *name)
 {
-	char tmp[32];
+	struct backing_dev_info *bdi;
 	int error;
 
+	bdi = kmem_zalloc(sizeof (struct backing_dev_info), KM_SLEEP);
 	bdi->name = name;
 	bdi->capabilities = BDI_CAP_MAP_COPY;
 
 	error = bdi_init(bdi);
-	if (error)
+	if (error) {
+		kmem_free(bdi, sizeof (struct backing_dev_info));
 		return (error);
+	}
 
-	sprintf(tmp, "%.28s%s", name, "-%d");
-	error = bdi_register(bdi, NULL, tmp,
+	error = bdi_register(bdi, NULL, "%.28s-%ld", name,
 	    atomic_long_inc_return(&zfs_bdi_seq));
 	if (error) {
 		bdi_destroy(bdi);
+		kmem_free(bdi, sizeof (struct backing_dev_info));
 		return (error);
 	}
 
-	return (error);
+	sb->s_bdi = bdi;
+
+	return (0);
+}
+static inline void
+zpl_bdi_destroy(struct super_block *sb)
+{
+	struct backing_dev_info *bdi = sb->s_bdi;
+
+	bdi_destroy(bdi);
+	kmem_free(bdi, sizeof (struct backing_dev_info));
+	sb->s_bdi = NULL;
 }
 #endif
 
@@ -410,5 +480,16 @@ func(const struct path *path, struct kstat *stat, u32 request_mask,	\
 #error
 #endif
 
+/*
+ * 4.9 API change
+ * Preferred interface to get the current FS time.
+ */
+#if !defined(HAVE_CURRENT_TIME)
+static inline struct timespec
+current_time(struct inode *ip)
+{
+	return (timespec_trunc(current_kernel_time(), ip->i_sb->s_time_gran));
+}
+#endif
 
 #endif /* _ZFS_VFS_H */
diff --git a/zfs/include/sys/Makefile.in b/zfs/include/sys/Makefile.in
index 31ec15631522..a55ca46f31ab 100644
--- a/zfs/include/sys/Makefile.in
+++ b/zfs/include/sys/Makefile.in
@@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/include/sys/fm/Makefile.in b/zfs/include/sys/fm/Makefile.in
index 1a591251029f..8a8f511563c2 100644
--- a/zfs/include/sys/fm/Makefile.in
+++ b/zfs/include/sys/fm/Makefile.in
@@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/include/sys/fm/fs/Makefile.in b/zfs/include/sys/fm/fs/Makefile.in
index 13ebf8e6f24c..7835ba601cae 100644
--- a/zfs/include/sys/fm/fs/Makefile.in
+++ b/zfs/include/sys/fm/fs/Makefile.in
@@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/include/sys/fs/Makefile.in b/zfs/include/sys/fs/Makefile.in
index 66ca4e2678bb..e3a365979171 100644
--- a/zfs/include/sys/fs/Makefile.in
+++ b/zfs/include/sys/fs/Makefile.in
@@ -100,7 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-bdev-block-device-operations.m4 \
 	$(top_srcdir)/config/kernel-bdev-logical-size.m4 \
 	$(top_srcdir)/config/kernel-bdev-physical-size.m4 \
-	$(top_srcdir)/config/kernel-bdi-setup-and-register.m4 \
+	$(top_srcdir)/config/kernel-bdi.m4 \
 	$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
 	$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
 	$(top_srcdir)/config/kernel-bio-failfast.m4 \
@@ -118,6 +118,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
 	$(top_srcdir)/config/kernel-clear-inode.m4 \
 	$(top_srcdir)/config/kernel-commit-metadata.m4 \
 	$(top_srcdir)/config/kernel-create-nameidata.m4 \
+	$(top_srcdir)/config/kernel-current-time.m4 \
 	$(top_srcdir)/config/kernel-current_bio_tail.m4 \
 	$(top_srcdir)/config/kernel-d-make-root.m4 \
 	$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/zfs/include/sys/zfs_context.h b/zfs/include/sys/zfs_context.h
index 4f7e3287f3da..4eba6283f160 100644
--- a/zfs/include/sys/zfs_context.h
+++ b/zfs/include/sys/zfs_context.h
@@ -748,6 +748,7 @@ typedef int fstrans_cookie_t;
 extern fstrans_cookie_t spl_fstrans_mark(void);
 extern void spl_fstrans_unmark(fstrans_cookie_t);
 extern int spl_fstrans_check(void);
+extern int __spl_pf_fstrans_check(void);
 
 #endif /* _KERNEL */
 #endif	/* _SYS_ZFS_CONTEXT_H */
diff --git a/zfs/include/sys/zfs_vfsops.h b/zfs/include/sys/zfs_vfsops.h
index efaefdaccbc1..d971c082c44c 100644
--- a/zfs/include/sys/zfs_vfsops.h
+++ b/zfs/include/sys/zfs_vfsops.h
@@ -64,7 +64,6 @@ typedef struct zfs_mntopts {
 
 typedef struct zfs_sb {
 	struct super_block *z_sb;	/* generic super_block */
-	struct backing_dev_info z_bdi;	/* generic backing dev info */
 	struct zfs_sb	*z_parent;	/* parent fs */
 	objset_t	*z_os;		/* objset reference */
 	zfs_mntopts_t	*z_mntopts;	/* passed mount options */
diff --git a/zfs/module/zfs/vdev_file.c b/zfs/module/zfs/vdev_file.c
index a29ea7bf9515..3e31718e860b 100644
--- a/zfs/module/zfs/vdev_file.c
+++ b/zfs/module/zfs/vdev_file.c
@@ -200,7 +200,7 @@ vdev_file_io_start(zio_t *zio)
 			 * already set, see xfs_vm_writepage().  Therefore
 			 * the sync must be dispatched to a different context.
 			 */
-			if (spl_fstrans_check()) {
+			if (__spl_pf_fstrans_check()) {
 				VERIFY3U(taskq_dispatch(system_taskq,
 				    vdev_file_io_fsync, zio, TQ_SLEEP), !=, 0);
 				return;
diff --git a/zfs/module/zfs/zfs_ctldir.c b/zfs/module/zfs/zfs_ctldir.c
index 2767b235d5f9..ebf60408da43 100644
--- a/zfs/module/zfs/zfs_ctldir.c
+++ b/zfs/module/zfs/zfs_ctldir.c
@@ -455,7 +455,7 @@ static struct inode *
 zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
     const struct file_operations *fops, const struct inode_operations *ops)
 {
-	struct timespec now = current_fs_time(zsb->z_sb);
+	struct timespec now;
 	struct inode *ip;
 	znode_t *zp;
 
@@ -463,6 +463,7 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
 	if (ip == NULL)
 		return (NULL);
 
+	now = current_time(ip);
 	zp = ITOZ(ip);
 	ASSERT3P(zp->z_dirlocks, ==, NULL);
 	ASSERT3P(zp->z_acl_cached, ==, NULL);
diff --git a/zfs/module/zfs/zfs_vfsops.c b/zfs/module/zfs/zfs_vfsops.c
index d7786f6b6601..589b48d0f668 100644
--- a/zfs/module/zfs/zfs_vfsops.c
+++ b/zfs/module/zfs/zfs_vfsops.c
@@ -1403,13 +1403,13 @@ zfs_domount(struct super_block *sb, zfs_mntopts_t *zmo, int silent)
 	sb->s_time_gran = 1;
 	sb->s_blocksize = recordsize;
 	sb->s_blocksize_bits = ilog2(recordsize);
-	zsb->z_bdi.ra_pages = 0;
-	sb->s_bdi = &zsb->z_bdi;
 
-	error = -zpl_bdi_setup_and_register(&zsb->z_bdi, "zfs");
+	error = -zpl_bdi_setup(sb, "zfs");
 	if (error)
 		goto out;
 
+	sb->s_bdi->ra_pages = 0;
+
 	/* Set callback operations for the file system. */
 	sb->s_op = &zpl_super_operations;
 	sb->s_xattr = zpl_xattr_handlers;
@@ -1505,7 +1505,7 @@ zfs_umount(struct super_block *sb)
 	arc_remove_prune_callback(zsb->z_arc_prune);
 	VERIFY(zfs_sb_teardown(zsb, B_TRUE) == 0);
 	os = zsb->z_os;
-	bdi_destroy(sb->s_bdi);
+	zpl_bdi_destroy(sb);
 
 	/*
 	 * z_os will be NULL if there was an error in
diff --git a/zfs/module/zfs/zpl_ctldir.c b/zfs/module/zfs/zpl_ctldir.c
index 10ef4d369982..e31764fb620b 100644
--- a/zfs/module/zfs/zpl_ctldir.c
+++ b/zfs/module/zfs/zpl_ctldir.c
@@ -103,8 +103,10 @@ static int
 zpl_root_getattr_impl(const struct path *path, struct kstat *stat,
     u32 request_mask, unsigned int query_flags)
 {
-	generic_fillattr(path->dentry->d_inode, stat);
-	stat->atime = CURRENT_TIME;
+	struct inode *ip = path->dentry->d_inode;
+
+	generic_fillattr(ip, stat);
+	stat->atime = current_time(ip);
 
 	return (0);
 }
@@ -377,14 +379,15 @@ static int
 zpl_snapdir_getattr_impl(const struct path *path, struct kstat *stat,
     u32 request_mask, unsigned int query_flags)
 {
-	zfs_sb_t *zsb = ITOZSB(path->dentry->d_inode);
+	struct inode *ip = path->dentry->d_inode;
+	zfs_sb_t *zsb = ITOZSB(ip);
 
 	ZFS_ENTER(zsb);
-	generic_fillattr(path->dentry->d_inode, stat);
+	generic_fillattr(ip, stat);
 
 	stat->nlink = stat->size = 2;
 	stat->ctime = stat->mtime = dmu_objset_snap_cmtime(zsb->z_os);
-	stat->atime = CURRENT_TIME;
+	stat->atime = current_time(ip);
 	ZFS_EXIT(zsb);
 
 	return (0);
@@ -522,7 +525,7 @@ zpl_shares_getattr_impl(const struct path *path, struct kstat *stat,
 	if (zsb->z_shares_dir == 0) {
 		generic_fillattr(path->dentry->d_inode, stat);
 		stat->nlink = stat->size = 2;
-		stat->atime = CURRENT_TIME;
+		stat->atime = current_time(ip);
 		ZFS_EXIT(zsb);
 		return (0);
 	}
diff --git a/zfs/module/zfs/zpl_inode.c b/zfs/module/zfs/zpl_inode.c
index 7aded9df2732..88f333d22c61 100644
--- a/zfs/module/zfs/zpl_inode.c
+++ b/zfs/module/zfs/zpl_inode.c
@@ -557,7 +557,7 @@ zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
 		return (-EMLINK);
 
 	crhold(cr);
-	ip->i_ctime = CURRENT_TIME_SEC;
+	ip->i_ctime = current_time(ip);
 	igrab(ip); /* Use ihold() if available */
 
 	cookie = spl_fstrans_mark();
diff --git a/zfs/module/zfs/zpl_xattr.c b/zfs/module/zfs/zpl_xattr.c
index 58962076d6c8..b74b53a0e135 100644
--- a/zfs/module/zfs/zpl_xattr.c
+++ b/zfs/module/zfs/zpl_xattr.c
@@ -938,7 +938,6 @@ xattr_handler_t zpl_xattr_security_handler = {
 int
 zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
 {
-	struct super_block *sb = ITOZSB(ip)->z_sb;
 	char *name, *value = NULL;
 	int error = 0;
 	size_t size = 0;
@@ -964,7 +963,7 @@ zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
 				 */
 				if (ip->i_mode != mode) {
 					ip->i_mode = mode;
-					ip->i_ctime = current_fs_time(sb);
+					ip->i_ctime = current_time(ip);
 					zfs_mark_inode_dirty(ip);
 				}
 
@@ -1130,7 +1129,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
 
 		if (!acl) {
 			ip->i_mode &= ~current_umask();
-			ip->i_ctime = current_fs_time(ITOZSB(ip)->z_sb);
+			ip->i_ctime = current_time(ip);
 			zfs_mark_inode_dirty(ip);
 			return (0);
 		}
diff --git a/zfs/zfs_config.h.in b/zfs/zfs_config.h.in
index 3e11dd51e766..5e1bfc8c4d6d 100644
--- a/zfs/zfs_config.h.in
+++ b/zfs/zfs_config.h.in
@@ -129,6 +129,9 @@
 /* current->bio_tail exists */
 #undef HAVE_CURRENT_BIO_TAIL
 
+/* current_time() exists */
+#undef HAVE_CURRENT_TIME
+
 /* DECLARE_EVENT_CLASS() is available */
 #undef HAVE_DECLARE_EVENT_CLASS
 
@@ -372,6 +375,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* super_setup_bdi_name() exits */
+#undef HAVE_SUPER_SETUP_BDI_NAME
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
-- 
2.11.0





More information about the kernel-team mailing list