]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Linux <4.8 compat: submit_bio() rw arg
authorFinix1979 <yanchongwen@hotmail.com>
Tue, 25 Jan 2022 21:12:49 +0000 (05:12 +0800)
committerGitHub <noreply@github.com>
Tue, 25 Jan 2022 21:12:49 +0000 (13:12 -0800)
When using the two argument version of submit_bio() in kernel's prior
to 4.8 the first argument should be specified.  It's used by block
dump to report the bio direction.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Finix Yan <yancw@info2soft.com>
Closes #13006

module/os/linux/zfs/vdev_disk.c

index c06ba613b16dca3e796e683adbf06ae2e8536b8c..61518bad0b1cdd94ea7529b7a661f9e9a8cedd77 100644 (file)
@@ -446,7 +446,7 @@ vdev_submit_bio_impl(struct bio *bio)
 #ifdef HAVE_1ARG_SUBMIT_BIO
        (void) submit_bio(bio);
 #else
-       (void) submit_bio(0, bio);
+       (void) submit_bio(bio_data_dir(bio), bio);
 #endif
 }