]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: implement .cleanup_rq callback
authorMing Lei <ming.lei@redhat.com>
Thu, 25 Jul 2019 02:05:00 +0000 (10:05 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:42:08 +0000 (21:42 -0600)
commitbacf9d747e923fef7f97688af54d527f41845267
tree8bc7fbf19896194d3c72bde6105bc69e379c7a8c
parentebc2b90c1210dcf693c297929ae531af5cf46b47
scsi: implement .cleanup_rq callback

Implement .cleanup_rq() callback for freeing driver private part
of the request. Then we can avoid to leak this part if the request isn't
completed by SCSI, and freed by blk-mq or upper layer(such as dm-rq) finally.

Cc: Ewan D. Milne <emilne@redhat.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel@redhat.com
Cc: <stable@vger.kernel.org>
Fixes: 49eefff7dcc9 ("blk-mq: improve DM's blk-mq IO merging via blk_insert_cloned_request feedback")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_lib.c