mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Linux 4.8 compat: submit_bio()
The rw argument has been removed from submit_bio/submit_bio_wait. Callers are now expected to set bio->bi_rw instead of passing it in. See https://github.com/torvalds/linux/commit/4e49ea4a for complete details. Signed-off-by: Tim Chase <tim@chase2k.com> Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #4892 Issue #4899
This commit is contained in:
+13
-2
@@ -484,18 +484,29 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int bio_size)
|
||||
return (bio_size);
|
||||
}
|
||||
|
||||
static inline void
|
||||
vdev_submit_bio_impl(int rw, struct bio *bio)
|
||||
{
|
||||
#ifdef HAVE_1ARG_SUBMIT_BIO
|
||||
bio->bi_rw |= rw;
|
||||
submit_bio(bio);
|
||||
#else
|
||||
submit_bio(rw, bio);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
vdev_submit_bio(int rw, struct bio *bio)
|
||||
{
|
||||
#ifdef HAVE_CURRENT_BIO_TAIL
|
||||
struct bio **bio_tail = current->bio_tail;
|
||||
current->bio_tail = NULL;
|
||||
submit_bio(rw, bio);
|
||||
vdev_submit_bio_impl(rw, bio);
|
||||
current->bio_tail = bio_tail;
|
||||
#else
|
||||
struct bio_list *bio_list = current->bio_list;
|
||||
current->bio_list = NULL;
|
||||
submit_bio(rw, bio);
|
||||
vdev_submit_bio_impl(rw, bio);
|
||||
current->bio_list = bio_list;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user