Message ID | 20180921121505.28170-1-hare@suse.de (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | ib_srp: Remove WARN_ON in srp_terminate_io() | expand |
On Fri, Sep 21, 2018 at 02:15:05PM +0200, Hannes Reinecke wrote: > 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_queuecomment() s/srp_queuecomment/srp_queuecommand/
On 9/21/18 5:15 AM, Hannes Reinecke wrote: > 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_queuecomment() > > Signed-off-by: Hannes Reinecke <hare@suse.com> > --- > drivers/infiniband/ulp/srp/ib_srp.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c > index 444d16520506..4f6e88136da3 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -1334,13 +1334,6 @@ static void srp_terminate_io(struct srp_rport *rport) > 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]; Since this function is not in the hot path and since this function is called indirectly, I'd like to keep the above code as documentation of the requirements for callers of this function. Please also Cc the linux-rdma mailing list for SRP initiator changes. Thanks, Bart.
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 444d16520506..4f6e88136da3 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1334,13 +1334,6 @@ static void srp_terminate_io(struct srp_rport *rport) 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];
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_queuecomment() Signed-off-by: Hannes Reinecke <hare@suse.com> --- drivers/infiniband/ulp/srp/ib_srp.c | 7 ------- 1 file changed, 7 deletions(-)