]> granicus.if.org Git - zfs/commitdiff
Fix autoconf detection of super_setup_bdi_name
authorJustin Bedő <cu@cua0.org>
Tue, 25 Jul 2017 17:30:20 +0000 (03:30 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 25 Jul 2017 17:30:20 +0000 (10:30 -0700)
The previous autoconf test for the presence of super_setup_bdi_name()
uses an invocation with an incorrect type signature, producing a
warning by the compiler when the test is run. This gets elevated to an
error when compiling with -Werror=format-security, causing autoconf to
falsely infer super_setup_bdi_name() is not present. This updates the
testing code to match the invocation used in
include/linux/vfs_compat.h.

Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Justin Bedo <cu@cua0.org>
Closes #6398

config/kernel-bdi.m4

index c2a9dd28bf4e8b8828771637c81be5c8bdb264cf..cb7479ee9c4695084d89f4e2c5ffd5038e786cba 100644 (file)
@@ -11,8 +11,9 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI], [
                struct super_block sb;
        ], [
                char *name = "bdi";
+               atomic_long_t zfs_bdi_seq;
                int error __attribute__((unused)) =
-                   super_setup_bdi_name(&sb, name);
+                   super_setup_bdi_name(&sb, "%.28s-%ld", name, atomic_long_inc_return(&zfs_bdi_seq));
        ], [super_setup_bdi_name], [fs/super.c], [
                AC_MSG_RESULT(yes)
                AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,