From 70719549f076d8b73e96470746bbe320b59a1ae3 Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Sun, 9 Aug 2020 12:03:03 -0400 Subject: [PATCH] Linux 5.9 compat: add linux/blkdev.h include Many of the block device operations (often functions with bdev in the name) were moved into linux/blkdev.h from linux/fs.h. Seems that this header is already included where needed in the code, but in the autoconf tests it was missing causing false negatives. This commit has those tests include linux/fs.h (old location) and now also linux/blkdev.h (new locations). Reviewed-by: Brian Behlendorf Signed-off-by: Coleman Kane Closes #10696 (cherry picked from commit 1823c8fe6a4a20971463e9b51615dad412aea9a9) Signed-off-by: Eli Schwartz --- AUTHORS | 1 + config/kernel-blkdev-get-by-path.m4 | 1 + config/kernel-blkdev-reread-part.m4 | 1 + config/kernel-invalidate-bdev-args.m4 | 1 + config/kernel-lookup-bdev.m4 | 1 + 5 files changed, 5 insertions(+) diff --git a/AUTHORS b/AUTHORS index 8314a1c214..5b183bdee2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -83,6 +83,7 @@ CONTRIBUTORS: Christopher Voltz Chunwei Chen Clemens Fruhwirth + Coleman Kane Colin Ian King Craig Loomis Craig Sanders diff --git a/config/kernel-blkdev-get-by-path.m4 b/config/kernel-blkdev-get-by-path.m4 index fb0cea6af5..62e4f5bf96 100644 --- a/config/kernel-blkdev-get-by-path.m4 +++ b/config/kernel-blkdev-get-by-path.m4 @@ -6,6 +6,7 @@ dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH], [ ZFS_LINUX_TEST_SRC([blkdev_get_by_path], [ #include + #include ], [ blkdev_get_by_path(NULL, 0, NULL); ]) diff --git a/config/kernel-blkdev-reread-part.m4 b/config/kernel-blkdev-reread-part.m4 index 1bf1e7c3a2..011eeaeea1 100644 --- a/config/kernel-blkdev-reread-part.m4 +++ b/config/kernel-blkdev-reread-part.m4 @@ -5,6 +5,7 @@ dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART], [ ZFS_LINUX_TEST_SRC([blkdev_reread_part], [ #include + #include ], [ struct block_device *bdev = NULL; int error; diff --git a/config/kernel-invalidate-bdev-args.m4 b/config/kernel-invalidate-bdev-args.m4 index 55a784dd91..93b80e67fd 100644 --- a/config/kernel-invalidate-bdev-args.m4 +++ b/config/kernel-invalidate-bdev-args.m4 @@ -5,6 +5,7 @@ dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_INVALIDATE_BDEV], [ ZFS_LINUX_TEST_SRC([invalidate_bdev], [ #include + #include ],[ struct block_device *bdev = NULL; invalidate_bdev(bdev); diff --git a/config/kernel-lookup-bdev.m4 b/config/kernel-lookup-bdev.m4 index 72b4993e14..69df60fa2a 100644 --- a/config/kernel-lookup-bdev.m4 +++ b/config/kernel-lookup-bdev.m4 @@ -5,6 +5,7 @@ dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_LOOKUP_BDEV], [ ZFS_LINUX_TEST_SRC([lookup_bdev_1arg], [ #include + #include ], [ lookup_bdev(NULL); ])