From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4E68248F4B for ; Wed, 19 Aug 2026 05:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787118345; cv=none; b=Zs8lMN2bQmUM8Z7/OfG0r8o+3KjTzjnPXXJqi/ig1zH466EipXUUw+ulDTQ8a1qxFsiRKLXo5vbe2gQc5lCdNKC2e3KUvHCzKlWxq3J5DezQUVnrHY4zuWkKu4g7eIkC8NwBOIpwWHbhTMTbykm7My3ZwXuGS4Mws5qB/Y36tI4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787118345; c=relaxed/simple; bh=HTHEGH4PFDqgmHlREvPzaOdrHUjsHr2X74zsgl5q7AU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oXHe/fpEKJjiCmx9M3SmafegacULfJRJCewB3CmW79OIen63oZ42l/cPq4tSpJARXJnWFZad9zvnHJbOx7QdnUWaZynnDeXNJ1zz/+P6PsNGjj+D3mV7TYR+LuX4ooQZWfPHzp1fJTHvTqRnObiuxzb8VBaYp2qcglZeAJs2zZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 54C6F68CFE; Wed, 19 Aug 2026 07:45:37 +0200 (CEST) Date: Wed, 19 Aug 2026 07:45:36 +0200 From: Christoph Hellwig To: Xixin Liu Cc: linux-nvme@lists.infradead.org, kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme-rdma: fix -EIO cleanup order in queue_rq Message-ID: <20260819054536.GA32649@lst.de> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Aug 13, 2026 at 05:45:00PM +0800, Xixin Liu wrote: > - nvme_cleanup_cmd(rq); > + if (err != -EIO) { > + nvme_cleanup_cmd(rq); > + ret = (err == -ENOMEM || err == -EAGAIN) ? > + BLK_STS_RESOURCE : BLK_STS_IOERR; Please stick to the much more readable if/else here.