aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-07-27 02:23:53 +0000
committerBrian Behlendorf <[email protected]>2016-07-29 14:48:00 -0700
commitbbb1b6cea75ff8ff27742ce778664ddeec371a01 (patch)
tree14250e654221384e36fa8179144a59714d2af477 /module/zfs
parentf26b4b3c8a0db1b215caeeb80868381bc324d449 (diff)
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 <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #4892 Issue #4899
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/vdev_disk.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 205f78d78..28f145d04 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -485,17 +485,28 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int 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
}