summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorBenjamin LaHaise <bcrl@kvack.org>2014-07-14 19:14:27 +0200
committerBenjamin LaHaise <bcrl@kvack.org>2014-07-14 19:14:27 +0200
commit6e830d53717cf3d5c30c1afce3773ef97e436cd9 (patch)
tree9376a0424b8f9fff12d107aa2498e775da20e85d /block/bio.c
parentaio: kill the misleading rcu read locks in ioctx_add_table() and kill_ioctx() (diff)
parentaio: protect reqs_available updates from changes in interrupt handlers (diff)
downloadlinux-6e830d53717cf3d5c30c1afce3773ef97e436cd9.tar.xz
linux-6e830d53717cf3d5c30c1afce3773ef97e436cd9.zip
Merge ../aio-fixes
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c
index 8c2e55e39a1b..0ec61c9e536c 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -746,6 +746,14 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page
goto done;
}
+
+ /*
+ * If the queue doesn't support SG gaps and adding this
+ * offset would create a gap, disallow it.
+ */
+ if (q->queue_flags & (1 << QUEUE_FLAG_SG_GAPS) &&
+ bvec_gap_to_prev(prev, offset))
+ return 0;
}
if (bio->bi_vcnt >= bio->bi_max_vecs)