nvme: don't abort completed request in nvme_cancel_request
commit78ca40724713bd422873cb4ebee86f9f499650f7
authorMing Lei <ming.lei@redhat.com>
Wed, 24 Jul 2019 03:48:41 +0000 (24 11:48 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:41:29 +0000 (4 21:41 -0600)
treefeaeb947cb95a5b57cba870daf71fc84891007b4
parentf9934a80f91dba8c7029ba7601459e41ea7770aa
nvme: don't abort completed request in nvme_cancel_request

Before aborting in-flight requests, all IO queues and their interrupts
have been shutdown. However, request's completion function may not be
done yet because it can be scheduled to run via IPI.

So don't abort one request if it is marked as completed, otherwise
we may abort one normal completed request.

Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c