History

block: Always check queue limits for cloned requests

When a cloned request is retried on other queues it always needs to be checked against the queue limits of that queue. Otherwise the calculations for nr_phys_segments might be wrong, leading to a crash in scsi_init_sgtable(). To clarify this the patch renames blk_rq_check_limits() to blk_cloned_rq_check_limits() and removes the symbol export, as the new function should only be used for cloned requests and never exported.

Hannes Reinecke committed 10 years ago

Commit bf4e6b41 parent d0a712c2 files · +7 −15Browse files

Showing the changes to include/linux/blkdev.h (1 of 2 files). Show all

Unified · Split

include/linux/blkdev.h+0−1
@@ -773,7 +773,6 @@ extern void blk_rq_set_block_pc(struct request *); · 772 unmodified lines
773773 extern void blk_requeue_request(struct request_queue *, struct request *);
774774 extern void blk_add_request_payload(struct request *rq, struct page *page,
775775 unsigned int len);
776−extern int blk_rq_check_limits(struct request_queue *q, struct request *rq);
777776 extern int blk_lld_busy(struct request_queue *q);
778777 extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
779778 struct bio_set *bs, gfp_t gfp_mask,