From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191AbcBARQr (ORCPT ); Mon, 1 Feb 2016 12:16:47 -0500 Received: from mail-yk0-f196.google.com ([209.85.160.196]:36375 "EHLO mail-yk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754016AbcBARQp (ORCPT ); Mon, 1 Feb 2016 12:16:45 -0500 Date: Mon, 1 Feb 2016 12:16:42 -0500 From: Tejun Heo To: Roman Pen Cc: "Martin K. Petersen" , "Rafael J. Wysocki" , Alexander Viro , Dan Williams , Gi-Oh Kim , Jens Axboe , Len Brown , Ming Lei , Pavel Machek , Sagi Grimberg , Vishal Verma , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 0/4] introduce new put_getdisk() call Message-ID: <20160201171642.GC14091@mtj.duckdns.org> References: <1454338315-13465-1-git-send-email-roman.penyaev@profitbricks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454338315-13465-1-git-send-email-roman.penyaev@profitbricks.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2016 at 03:51:51PM +0100, Roman Pen wrote: > Hello. > > In this patchset in the first patch I fixed module reference leak inside > blk-cgroup.c. In other patches I switched to a new put_getdisk() call, > which should be used if the disk was received by get_disk() or get_gendisk() > functions, which internally increase module reference. > > The idea is to avoid confusion in the future and to have symmetric calls: > > alloc_disk() -> put_disk() [as it is done in all the block drivers] > > and > > get_gendisk() -> put_gendisk() [if you need to find a disk by minor,major] > > The second sequence internally increases disk owner module reference on > get and decreases it on put. For the entire series, Acked-by: Tejun Heo Nice catch, thanks! -- tejun