From: Keith Busch Date: Tue, 24 Jan 2017 23:07:00 +0000 (-0500) Subject: nvme/pci: Don't mark IOD as aborted if abort wasn't sent X-Git-Tag: v4.11-rc1~142^2~1^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bf7d778620d83f14fcd92d0938fb97c7d78bf19;p=platform%2Fkernel%2Flinux-exynos.git nvme/pci: Don't mark IOD as aborted if abort wasn't sent This patch sets the aborted flag only if an abort was sent, reducing excessive kernel message spamming for completed IO that wasn't actually aborted. Reported-by: Jens Axboe Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index e1b4e60..06875bc 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -898,12 +898,11 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) return BLK_EH_HANDLED; } - iod->aborted = 1; - if (atomic_dec_return(&dev->ctrl.abort_limit) < 0) { atomic_inc(&dev->ctrl.abort_limit); return BLK_EH_RESET_TIMER; } + iod->aborted = 1; memset(&cmd, 0, sizeof(cmd)); cmd.abort.opcode = nvme_admin_abort_cmd;