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 <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #10696
(cherry picked from commit 1823c8fe6a)
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
This commit is contained in:
Coleman Kane 2020-08-09 12:03:03 -04:00 committed by Tony Hutter
parent 2d2ce04b99
commit 70719549f0
5 changed files with 5 additions and 0 deletions

View File

@ -83,6 +83,7 @@ CONTRIBUTORS:
Christopher Voltz <cjunk@voltz.ws>
Chunwei Chen <david.chen@nutanix.com>
Clemens Fruhwirth <clemens@endorphin.org>
Coleman Kane <ckane@colemankane.org>
Colin Ian King <colin.king@canonical.com>
Craig Loomis <cloomis@astro.princeton.edu>
Craig Sanders <github@taz.net.au>

View File

@ -6,6 +6,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH], [
ZFS_LINUX_TEST_SRC([blkdev_get_by_path], [
#include <linux/fs.h>
#include <linux/blkdev.h>
], [
blkdev_get_by_path(NULL, 0, NULL);
])

View File

@ -5,6 +5,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART], [
ZFS_LINUX_TEST_SRC([blkdev_reread_part], [
#include <linux/fs.h>
#include <linux/blkdev.h>
], [
struct block_device *bdev = NULL;
int error;

View File

@ -5,6 +5,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_INVALIDATE_BDEV], [
ZFS_LINUX_TEST_SRC([invalidate_bdev], [
#include <linux/buffer_head.h>
#include <linux/blkdev.h>
],[
struct block_device *bdev = NULL;
invalidate_bdev(bdev);

View File

@ -5,6 +5,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_LOOKUP_BDEV], [
ZFS_LINUX_TEST_SRC([lookup_bdev_1arg], [
#include <linux/fs.h>
#include <linux/blkdev.h>
], [
lookup_bdev(NULL);
])