From patchwork Tue Oct 16 14:38:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 10643679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 234B5112B for ; Tue, 16 Oct 2018 14:38:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10D0A2A1F8 for ; Tue, 16 Oct 2018 14:38:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 056CE2A209; Tue, 16 Oct 2018 14:38:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BBC72A1F8 for ; Tue, 16 Oct 2018 14:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbeJPW3g (ORCPT ); Tue, 16 Oct 2018 18:29:36 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:52307 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbeJPW3f (ORCPT ); Tue, 16 Oct 2018 18:29:35 -0400 Received: by mail-it1-f195.google.com with SMTP id 134-v6so33404612itz.2 for ; Tue, 16 Oct 2018 07:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=MTFbpR3/iZO7hZqs/6cse1R36O+9uUmTaQkIl3ZAVX8=; b=uoTyuE7yD97+IFFgtRueZUpCnNS/mPvIV8/5K/F36QFQ0Vpi+KoTM0YE745IsTac2+ fv7yTw+BCSdS34HOkgA770cT03It5m9SS7wcD1fkNMVb2od+xeHCCosK09SKQngeY+Vz r0hD3PbckHD/lEHpVMZC+gJ/UwRbfwx6WAyeyGl0JXvoFtnkv9OWz9xnP/nm0rXCBxNB jxVvLsU0R9fXogmFv0p2FShmW4Z4pNsicN7L2lBk+9KKHVh25fEED7FCSkk+o5xMQLso sh/jxKw1ktxI+ucnYXn/2QckD1AVKHfXQaCpdbil1uEbN6HCDtLOMtaFyKOUrdj9fdDj Xrcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=MTFbpR3/iZO7hZqs/6cse1R36O+9uUmTaQkIl3ZAVX8=; b=AyNwKsRaIPOomhRxc6y84bI/VFxXoi0DENJ/akM+3Q6GLR67OTRVAkVCwj+J5DQCUK rJJMsBferv5xzAfFsr45b12z0crprJTnpPDHBA8idB7gDhm/chuPRQCIP4RX9QrLLbHi 4Np1abM11LPopNtria3nnK/Dw4r+VXI4wtuia9Ap593dh3ktZs7HxkSr178tooG5Muol Dx5Z3h9RBE6nDt+WolP6rviwjTrMPqFsgdBwH3pGWKO8AmB+wwzPKAfeXFQ6pdBKhRKk OC0Ih1g4JJ4Q2eeX0RSDkKA9DTQKGAaZn+vXGA9n1jFOqpgWBvied9PwLlsu/FX2I9nS PTDA== X-Gm-Message-State: ABuFfojF+5E8m7f0P4XUX/BAs3gnMZ/y10PFex3QKtN/wZqEZqNL0jSE z99bLSsP0ZUU72zfrJ+5qdpqnu5Km4M= X-Google-Smtp-Source: ACcGV61FYnl17cRoX5VZwi3ElKtm8mvxVYo3dIhF8EtHCWoTf2k/t23L0J7DwcoVdiG6WcrwxBa0sw== X-Received: by 2002:a02:9c5c:: with SMTP id h28-v6mr16908398jal.3.1539700730081; Tue, 16 Oct 2018 07:38:50 -0700 (PDT) Received: from [192.168.1.56] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id n5-v6sm4134240ioh.58.2018.10.16.07.38.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 07:38:48 -0700 (PDT) To: linux-scsi Cc: "dgilbert@interlog.com" From: Jens Axboe Subject: [PATCH] sg: remove bad blk_end_request_all() call Message-ID: Date: Tue, 16 Oct 2018 08:38:47 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We just need to free the request here. Additionally, this is currently wrong for a queue that's using MQ currently, it'll crash. Cc: Doug Gilbert Cc: linux-scsi@vger.kernel.org Signed-off-by: Jens Axboe Acked-by: Douglas Gilbert --- drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 8a254bb46a9b..c6ad00703c5b 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -822,7 +822,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, if (atomic_read(&sdp->detaching)) { if (srp->bio) { scsi_req_free_cmd(scsi_req(srp->rq)); - blk_end_request_all(srp->rq, BLK_STS_IOERR); + blk_put_request(srp->rq); srp->rq = NULL; }