config: remove HAVE_BIO_SET_DEV

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16479
This commit is contained in:
Rob Norris 2024-08-24 22:11:04 +10:00 committed by Brian Behlendorf
parent 0a61e51736
commit a298801426
2 changed files with 12 additions and 31 deletions

View File

@ -66,28 +66,20 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_SET_DEV_MACRO], [
]) ])
AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [ AC_DEFUN([ZFS_AC_KERNEL_BIO_SET_DEV], [
AC_MSG_CHECKING([whether bio_set_dev() is available]) AC_MSG_CHECKING([whether bio_set_dev() is GPL-only])
ZFS_LINUX_TEST_RESULT([bio_set_dev], [ ZFS_LINUX_TEST_RESULT([bio_set_dev_license], [
AC_MSG_RESULT(no)
],[
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BIO_SET_DEV, 1, [bio_set_dev() is available]) AC_DEFINE(HAVE_BIO_SET_DEV_GPL_ONLY, 1,
[bio_set_dev() GPL-only])
])
AC_MSG_CHECKING([whether bio_set_dev() is GPL-only]) AC_MSG_CHECKING([whether bio_set_dev() is a macro])
ZFS_LINUX_TEST_RESULT([bio_set_dev_license], [ ZFS_LINUX_TEST_RESULT([bio_set_dev_macro], [
AC_MSG_RESULT(no) AC_MSG_RESULT(yes)
],[ AC_DEFINE(HAVE_BIO_SET_DEV_MACRO, 1,
AC_MSG_RESULT(yes) [bio_set_dev() is a macro])
AC_DEFINE(HAVE_BIO_SET_DEV_GPL_ONLY, 1,
[bio_set_dev() GPL-only])
])
AC_MSG_CHECKING([whether bio_set_dev() is a macro])
ZFS_LINUX_TEST_RESULT([bio_set_dev_macro], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BIO_SET_DEV_MACRO, 1,
[bio_set_dev() is a macro])
],[
AC_MSG_RESULT(no)
])
],[ ],[
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
]) ])

View File

@ -496,7 +496,6 @@ vdev_disk_close(vdev_t *v)
*/ */
#if !defined(HAVE_BIO_ALLOC_4ARG) #if !defined(HAVE_BIO_ALLOC_4ARG)
#ifdef HAVE_BIO_SET_DEV
#if defined(CONFIG_BLK_CGROUP) && defined(HAVE_BIO_SET_DEV_GPL_ONLY) #if defined(CONFIG_BLK_CGROUP) && defined(HAVE_BIO_SET_DEV_GPL_ONLY)
/* /*
* The Linux 5.5 kernel updated percpu_ref_tryget() which is inlined by * The Linux 5.5 kernel updated percpu_ref_tryget() which is inlined by
@ -582,16 +581,6 @@ vdev_bio_set_dev(struct bio *bio, struct block_device *bdev)
#define bio_set_dev vdev_bio_set_dev #define bio_set_dev vdev_bio_set_dev
#endif #endif
#endif #endif
#else
/*
* Provide a bio_set_dev() helper macro for pre-Linux 4.14 kernels.
*/
static inline void
bio_set_dev(struct bio *bio, struct block_device *bdev)
{
bio->bi_bdev = bdev;
}
#endif /* HAVE_BIO_SET_DEV */
#endif /* !HAVE_BIO_ALLOC_4ARG */ #endif /* !HAVE_BIO_ALLOC_4ARG */
static inline void static inline void