Linux <4.8 compat: submit_bio() rw arg

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
This commit is contained in:
Finix1979 2022-01-26 05:12:49 +08:00 committed by GitHub
parent 5dccd7e8f3
commit a3fbe2b942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,7 +446,7 @@ vdev_submit_bio_impl(struct bio *bio)
#ifdef HAVE_1ARG_SUBMIT_BIO #ifdef HAVE_1ARG_SUBMIT_BIO
(void) submit_bio(bio); (void) submit_bio(bio);
#else #else
(void) submit_bio(0, bio); (void) submit_bio(bio_data_dir(bio), bio);
#endif #endif
} }