Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp577077pxu; Wed, 7 Oct 2020 10:13:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcb4jxYJcHvk6WEjBey1FO+8va5I9emuyTpqMTjNOdtsNqs9073G4VAXrWsySiO1BtbRz7 X-Received: by 2002:a17:906:95d1:: with SMTP id n17mr4522203ejy.75.1602090832878; Wed, 07 Oct 2020 10:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602090832; cv=none; d=google.com; s=arc-20160816; b=ORFNz6Ep6a0OTZnYPXwJ3efrzXPUIZvVDM/vVNxw4F7PQZsQdeeVisw0g95NOjD+tf audZqEj2pZ3u+9DEMHAgWu8T9pmjeuy9Asz9o3UmrzgCUf6zW2nmOjpRQVdEGdlExKjE vh3oac3OzMlyzd50tk4g48hp8v9suZxwcoLZL7Q8d0im4E1kgqKcRIgnq2/TTQL0Brak GHB+XbeousoENsF/B5DxNs3UZq9BanVa4svBOZ0/Tb50XTasq4YsH5ggRnMLFAwzlG0F HsQoxC47tuuKn+fIzGDuW5JnruiCqs5PVcz0uhWO4Eo6hjGTPZ3T4LZPpxhMdOG43MsY NzEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=3UM55CoqqHkcrHUsKs7k2WAWmBdGlAu974midn3juJg=; b=wxl1X8S04iKhLIGnfjJCz/F/JXVLR9JvoQYuCvpHrDuMQBS1JkR2tOaRv/KCobgzp7 yCqyww4gBQKiVTMIsgfAzJBvzTiS1pIfQM7pYkuoj9z8Skb7tx1SVq40qM68Jwbqtkya BztYoJKOyii6QrNg+HdUGNh7F9YNH10cGg60remon5VzHyz35+aLFSEiIVTR4SP4qZsX DI5D4eq7xW441HJnAVsc3gArRdmwnMNlZ+SkCyU/EIeClC0DL9XTtybs10Czn4dOCyb5 lye69teLAfpy7hpSJzUd7uGuTeBwAZFIFv6Sh4AQWSauuexz2jCr5oIDKZD2h8s1QSLh R5dQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi9si2662141edb.4.2020.10.07.10.13.29; Wed, 07 Oct 2020 10:13:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbgJGMOH (ORCPT + 99 others); Wed, 7 Oct 2020 08:14:07 -0400 Received: from verein.lst.de ([213.95.11.211]:37161 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727253AbgJGMOH (ORCPT ); Wed, 7 Oct 2020 08:14:07 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id CBDE26736F; Wed, 7 Oct 2020 14:14:03 +0200 (CEST) Date: Wed, 7 Oct 2020 14:14:03 +0200 From: Christoph Hellwig To: Christian Borntraeger Cc: Christoph Hellwig , Stefan Haberland , axboe@kernel.dk, hoeppner@linux.ibm.com, linux-s390@vger.kernel.org, heiko.carstens@de.ibm.com, gor@linux.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/2] s390/dasd: remove ioctl_by_bdev calls Message-ID: <20201007121403.GA30795@lst.de> References: <20200519142259.102279-1-sth@linux.ibm.com> <20200519142259.102279-3-sth@linux.ibm.com> <5c815b8a-7d77-5c69-9191-d09cc433f5ff@de.ibm.com> <20201007103936.GA24327@lst.de> <20201007120005.GA29788@lst.de> 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 02:09:18PM +0200, Christian Borntraeger wrote: > Unfortunately not. On insmodding virtio_blk I do get: Yeah, the symbol_put needs to be conditional as well. New version below: diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c index d6e18df9c53c6d..4b044e620d3534 100644 --- a/block/partitions/ibm.c +++ b/block/partitions/ibm.c @@ -305,8 +305,6 @@ int ibm_partition(struct parsed_partitions *state) if (!disk->fops->getgeo) goto out_exit; fn = symbol_get(dasd_biodasdinfo); - if (!fn) - goto out_exit; blocksize = bdev_logical_block_size(bdev); if (blocksize <= 0) goto out_symbol; @@ -326,7 +324,7 @@ int ibm_partition(struct parsed_partitions *state) geo->start = get_start_sect(bdev); if (disk->fops->getgeo(bdev, geo)) goto out_freeall; - if (fn(disk, info)) { + if (!fn || fn(disk, info)) { kfree(info); info = NULL; } @@ -370,7 +368,8 @@ int ibm_partition(struct parsed_partitions *state) out_nogeo: kfree(info); out_symbol: - symbol_put(dasd_biodasdinfo); + if (fn) + symbol_put(dasd_biodasdinfo); out_exit: return res; }