Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3419348pxf; Mon, 29 Mar 2021 01:30:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhUIsOnucEcooDs7/gzSMh+ApTmFl10wopkqp5EorWTr+n24LbtaJIdo/ZORNdJR9r2O1w X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr27430509ejz.318.1617006628236; Mon, 29 Mar 2021 01:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006628; cv=none; d=google.com; s=arc-20160816; b=ThsocYMfyLtnCRGgRmrsLMyi/g4xgzLTzHPCUNg6ZrkVJGE1TRc/+97HqPFe1mYMGA h/xWiPGpgEWbhs9SsbH1o1Qe9qN0pZcincma3kpU1LE6sp7t917USzZTvm9fM1d4q+8/ WRUqtb1iKFfIWNDo27kC+vZg4urI9kPrON9K2iALMdOhI3CGXgTyMG17jAu2u2yYpz7u Wk3jRYN/En9gbFsCdh9pavYvlOUT12tnOrN+PhmOTEy38MDAIDfPjEA+BubuCDJgYHL8 PQqOjYCLEUJM6JFLkg39U3AHGtXsIw8/BjLGgQ4eyJ7U3j7U5BTrn07XcTcQJdWqunbb 51fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hMESzakwH3+6hiHLVEHXdihmgj4+qON5EzK9QqH9zPI=; b=dRaL5pm8mUHFEw3zQqqY0gWeTQd5tApKZ5FUpLke4lszi/Ln/hhPdXpmbjqTNxOlbf jeNFhWTeNo80MmyVEO1KOGW2tYACU5NjgBdKKDNEQCZ+OWR0UHG9jtaAj4e0FnoapfcY jaFY/Zsyn6YAEITRMdrpLBPGwfZKcYZZKXSR59rKM79XRYFGqwGOs2tBsQHN/2uPfRYI w96TWro1sAkfFZG3hNDhx+8sxhtd2JTdDaGz05c4OI5l3td3R3J5yxINeN3fcT24MNQv WznLbjRigDaqSiL2ExYdx31Rt9mBm+Krlzie2MHSsb8VO6pIDf5XOiDM5jdZA/4XAJ8V Y5JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RZ8jkWnL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si12699607edd.589.2021.03.29.01.30.00; Mon, 29 Mar 2021 01:30:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RZ8jkWnL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234678AbhC2I2y (ORCPT + 99 others); Mon, 29 Mar 2021 04:28:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:34366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231629AbhC2ISY (ORCPT ); Mon, 29 Mar 2021 04:18:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7DBEB61477; Mon, 29 Mar 2021 08:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005904; bh=yReQle5R7YyyDgueXMc28fpkDS17842eEJgfaE/Pdt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZ8jkWnLHI9kIgi4N+Z07rVikCEPeHr5DpgP4lCSJjttmbj5STLxcv5txAuK0HrjM zNXvfMLIXwM2TWvpmYOuq1t4ycXfTuZCWpa3yiQTuyDTWrnaKBqI76CyrN57ZwDppF t2oJQv9p8VpOj1u17vXZ7ckRKNianagGyz8nGj+g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hannes Reinecke , Keith Busch , Sagi Grimberg , Chao Leng , Daniel Wagner , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 046/221] nvme: add NVME_REQ_CANCELLED flag in nvme_cancel_request() Date: Mon, 29 Mar 2021 09:56:17 +0200 Message-Id: <20210329075630.705766592@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hannes Reinecke [ Upstream commit d3589381987ec879b03f8ce3039df57e87f05901 ] NVME_REQ_CANCELLED is translated into -EINTR in nvme_submit_sync_cmd(), so we should be setting this flags during nvme_cancel_request() to ensure that the callers to nvme_submit_sync_cmd() will get the correct error code when the controller is reset. Signed-off-by: Hannes Reinecke Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chao Leng Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index fbe2918ade78..30e834d84f36 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -346,6 +346,7 @@ bool nvme_cancel_request(struct request *req, void *data, bool reserved) return true; nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD; + nvme_req(req)->flags |= NVME_REQ_CANCELLED; blk_mq_complete_request(req); return true; } -- 2.30.1