From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76D58C41604 for ; Tue, 6 Oct 2020 05:49:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43E3E2078A for ; Tue, 6 Oct 2020 05:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726769AbgJFFtX (ORCPT ); Tue, 6 Oct 2020 01:49:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:41592 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726588AbgJFFtW (ORCPT ); Tue, 6 Oct 2020 01:49:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 42594AC0C; Tue, 6 Oct 2020 05:49:20 +0000 (UTC) Subject: Re: [PATCH 08/10] scsi: cleanup allocation and freeing of sgtables To: Christoph Hellwig , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org References: <20201005084130.143273-1-hch@lst.de> <20201005084130.143273-9-hch@lst.de> From: Hannes Reinecke Message-ID: <5dfdca74-23c3-7679-dac8-cd59c4a7364c@suse.de> Date: Tue, 6 Oct 2020 07:49:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201005084130.143273-9-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On 10/5/20 10:41 AM, Christoph Hellwig wrote: > Rename scsi_init_io to scsi_alloc_sgtables, and ensure callers call > scsi_free_sgtables to cleanup failures close to scsi_init_io instead > of leaking it down the generic I/O submission path. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/scsi_lib.c | 22 ++++++++-------------- > drivers/scsi/sd.c | 27 +++++++++++++++------------ > drivers/scsi/sr.c | 16 ++++++---------- > include/scsi/scsi_cmnd.h | 3 ++- > 4 files changed, 31 insertions(+), 37 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer