summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-11-26 10:46:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 01:28:22 +0300
commitf6d45a66d0c5a4c5747df0b8a6eebaaa1126b56e (patch)
treeae8f0305d14b809a26027c6cd989dec6c8f48fc5 /include
parentf7b03cd741dc1f87936b58e841a2555c6a7deb00 (diff)
downloadlinux-f6d45a66d0c5a4c5747df0b8a6eebaaa1126b56e.tar.xz
block: Always check queue limits for cloned requests
commit bf4e6b4e757488dee1b6a581f49c7ac34cd217f8 upstream. 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. Cc: Mike Snitzer <snitzer@redhat.com> Cc: Ewan Milne <emilne@redhat.com> Cc: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Fixes: e2a60da74 ("block: Clean up special command handling logic") Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 19c2e947d4d1..3a3ff074782f 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -767,7 +767,6 @@ extern void blk_rq_set_block_pc(struct request *);
extern void blk_requeue_request(struct request_queue *, struct request *);
extern void blk_add_request_payload(struct request *rq, struct page *page,
unsigned int len);
-extern int blk_rq_check_limits(struct request_queue *q, struct request *rq);
extern int blk_lld_busy(struct request_queue *q);
extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src,
struct bio_set *bs, gfp_t gfp_mask,