Skip to content

Commit

Permalink
ib_srp: Remove WARN_ON in srp_terminate_io()
Browse files Browse the repository at this point in the history
The WARN_ON() is pointless as the rport is placed in SDEV_TRANSPORT_OFFLINE
at that time, so no new commands can be submitted via srp_queuecommand()

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com>
Acked-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Hannes Reinecke authored and Doug Ledford committed Oct 17, 2018
1 parent 6f4bc0e commit 56e027a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,17 +1330,8 @@ static void srp_terminate_io(struct srp_rport *rport)
{
struct srp_target_port *target = rport->lld_data;
struct srp_rdma_ch *ch;
struct Scsi_Host *shost = target->scsi_host;
struct scsi_device *sdev;
int i, j;

/*
* Invoking srp_terminate_io() while srp_queuecommand() is running
* is not safe. Hence the warning statement below.
*/
shost_for_each_device(sdev, shost)
WARN_ON_ONCE(sdev->request_queue->request_fn_active);

for (i = 0; i < target->ch_count; i++) {
ch = &target->ch[i];

Expand Down

0 comments on commit 56e027a

Please sign in to comment.