Skip to content

Commit

Permalink
Linux 5.16 compat: submit_bio()
Browse files Browse the repository at this point in the history
The submit_bio() prototype has changed again.  The version is 5.16
still only expects a single argument but the return type has changed
to void.  Since we never used the returned value before update the
configure check to detect both single arg versions.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12725
  • Loading branch information
behlendorf committed Nov 9, 2021
1 parent 1e7d634 commit 453c63e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions config/kernel-bio.m4
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_SUBMIT_BIO], [
ZFS_LINUX_TEST_SRC([submit_bio], [
#include <linux/bio.h>
],[
blk_qc_t blk_qc;
struct bio *bio = NULL;
blk_qc = submit_bio(bio);
(void) submit_bio(bio);
])
])

Expand Down
4 changes: 2 additions & 2 deletions module/os/linux/zfs/vdev_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ static inline void
vdev_submit_bio_impl(struct bio *bio)
{
#ifdef HAVE_1ARG_SUBMIT_BIO
submit_bio(bio);
(void) submit_bio(bio);
#else
submit_bio(0, bio);
(void) submit_bio(0, bio);
#endif
}

Expand Down

0 comments on commit 453c63e

Please sign in to comment.