From patchwork Wed Apr 26 07:34:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 755280 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wCX0H15ZJz9s7f for ; Wed, 26 Apr 2017 17:34:39 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="hHipVtIY"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1956425AbdDZHeh (ORCPT ); Wed, 26 Apr 2017 03:34:37 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:54732 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1956385AbdDZHeh (ORCPT ); Wed, 26 Apr 2017 03:34:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gGdAhPOlPXj5+bYm1vSJYnyrXZMoUPjrJ86f7vdpkQU=; b=hHipVtIY6L+uB6kPnNXHio5hD wIyKHi6IyAQjNzPIjo0MomnGPDbcbPPDC8TrMzojsEFBQneby1jo7noz8OIm8VFiaGQRm1HE80e0A Iv5k7jj6C4aMYUCg93GXr762pmfG5xObBA1TQbuuBZKX8AABMUMoA8d4Oixx6vM5yTiqPd27GLlgP zd5Rx+p/fmWiM8bwz8KbnSAbgml2ncTGDH/VUSJXu/jiihcCagvynIt1fjoW0DGLyz8ICiVUpa8TR rZDL4Y5IS+C32FeDMmqrjHaeNqoVaf/lQb8e4i8cVLPcBVZ3fElcNdzYbefS3Ley8sz6pDrKblvek 7RwH40l+g==; Received: from 212095007094.public.telering.at ([212.95.7.94] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1d3HT9-00088v-LX; Wed, 26 Apr 2017 07:34:36 +0000 From: Christoph Hellwig To: axboe@kernel.dk Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all Date: Wed, 26 Apr 2017 09:34:21 +0200 Message-Id: <20170426073422.14511-3-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170426073422.14511-1-hch@lst.de> References: <20170426073422.14511-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org ide_pm_execute_rq exectures a PM request synchronously, and in the failure case where it calls __blk_end_request_all it never checks the error field passed to the end_io callback, so don't bother setting it. Signed-off-by: Christoph Hellwig Reviewed-by: Bartlomiej Zolnierkiewicz Acked-by: David S. Miller --- drivers/ide/ide-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 277c2bb7616f..0977fc1f40ce 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c @@ -57,7 +57,7 @@ static int ide_pm_execute_rq(struct request *rq) if (unlikely(blk_queue_dying(q))) { rq->rq_flags |= RQF_QUIET; scsi_req(rq)->result = -ENXIO; - __blk_end_request_all(rq, scsi_req(rq)->result); + __blk_end_request_all(rq, 0); spin_unlock_irq(q->queue_lock); return -ENXIO; }