]> git.baikalelectronics.ru Git - kernel.git/commit
block: Always check queue limits for cloned requests
authorHannes Reinecke <hare@suse.de>
Thu, 26 Nov 2015 07:46:57 +0000 (08:46 +0100)
committerJens Axboe <axboe@fb.com>
Sun, 29 Nov 2015 21:37:27 +0000 (14:37 -0700)
commit56371cc152f2728ea8c725e8c3cd2b34e8399895
tree95e32c168d7478d0f541b5d19d1edf0e3d1160f1
parentf008afe5456fabe30ef9df875003dd23c21adca2
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.

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: a8cfe1366 ("block: Clean up special command handling logic")
Cc: stable@vger.kernel.org # 3.7+
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
include/linux/blkdev.h