All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fnic: to not call 'scsi_done()' for unhandled commands
@ 2020-05-15 11:26 Hannes Reinecke
  2020-05-15 13:06 ` Laurence Oberman
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hannes Reinecke @ 2020-05-15 11:26 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke,
	Hannes Reinecke

The fnic drivers assigns an ioreq structure to each command, and
severs this assignment once scsi_done() has been called and the
command has been completed.
So when traversing commands to terminate outstanding I/O we should
not call scsi_done() on commands which do not have a corresponding
ioreq structure; these commands have either never entered the driver
or have already been completed.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/fnic/fnic_scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 27535c90b248..8d2798cbd30f 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -1401,7 +1401,7 @@ static void fnic_cleanup_io(struct fnic *fnic, int exclude_id)
 		}
 		if (!io_req) {
 			spin_unlock_irqrestore(io_lock, flags);
-			goto cleanup_scsi_cmd;
+			continue;
 		}
 
 		CMD_SP(sc) = NULL;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-07  3:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 11:26 [PATCH] fnic: to not call 'scsi_done()' for unhandled commands Hannes Reinecke
2020-05-15 13:06 ` Laurence Oberman
2020-05-15 13:52   ` Hannes Reinecke
2020-05-15 14:04     ` Laurence Oberman
2020-06-23 13:53       ` Martin Wilck
     [not found]         ` <BYAPR11MB29971B225AB19F0DE072AF0BD7770@BYAPR11MB2997.namprd11.prod.outlook.com>
     [not found]           ` <BY5PR11MB3863DF6CE5C19EC0CFEA59F0C3380@BY5PR11MB3863.namprd11.prod.outlook.com>
     [not found]             ` <BY5PR11MB38636B3EF3A314D741AE0BDFC3320@BY5PR11MB3863.namprd11.prod.outlook.com>
2020-10-03  1:11               ` Martin K. Petersen
2020-05-15 19:07 ` kbuild test robot
2020-05-15 19:07   ` kbuild test robot
2020-10-07  3:47 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.