From: Stephen Cameron Date: Thu, 23 Apr 2015 14:32:11 +0000 (-0500) Subject: hpsa: decrement h->commands_outstanding in fail_all_outstanding_cmds X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=433b5f4dba2307e33ea65169009965f26496b6df;p=linux-beck.git hpsa: decrement h->commands_outstanding in fail_all_outstanding_cmds make tracking of outstanding commands more robust Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Signed-off-by: Don Brace Reviewed-by: Christoph Hellwig Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index ae9d9e17da37..d5a5a6413b6d 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -6892,6 +6892,7 @@ static void fail_all_outstanding_cmds(struct ctlr_info *h) if (refcount > 1) { c->err_info->CommandStatus = CMD_CTLR_LOCKUP; finish_cmd(c); + atomic_dec(&h->commands_outstanding); failcount++; } cmd_free(h, c);