projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/radeon: Make classic pageflip completion path less racy.
[linux-2.6-block.git]
/
block
/
bio.c
diff --git
a/block/bio.c
b/block/bio.c
index 8c2e55e39a1b9a6eca0c169f658b35a8006f5372..0ec61c9e536c2032778db165c7b31d98bdc5e735 100644
(file)
--- 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;
}
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)
}
if (bio->bi_vcnt >= bio->bi_max_vecs)