From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 2974C100542B for ; Fri, 18 May 2018 14:56:01 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id o78-v6so15082413wmg.0 for ; Fri, 18 May 2018 05:56:01 -0700 (PDT) Date: Fri, 18 May 2018 14:55:54 +0200 From: Lars Ellenberg To: Christoph Hellwig Message-ID: <20180518125554.GA9238@soda.linbit> References: <20180516094346.20506-1-hch@lst.de> <20180516094346.20506-29-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180516094346.20506-29-hch@lst.de> Cc: linux-rtc@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , devel@driverdev.osuosl.org, linux-scsi@vger.kernel.org, linux-acpi@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , megaraidlinux.pdl@broadcom.com, linux-kernel@vger.kernel.org, Alexey Dobriyan , linux-ide@vger.kernel.org, netfilter-devel@vger.kernel.org, Alexander Viro , netdev@vger.kernel.org, Andrew Morton , linux-ext4@vger.kernel.org, linux-afs@lists.infradead.org, jfs-discussion@lists.sourceforge.net, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH 28/42] drbd: switch to proc_create_single List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, May 16, 2018 at 11:43:32AM +0200, Christoph Hellwig wrote: > And stop messing with try_module_get on THIS_MODULE, which doesn't make > any sense here. The idea was to increase module count on /proc/drbd access. If someone holds /proc/drbd open, previously rmmod would "succeed" in starting the unload, but then block on remove_proc_entry, leading to a situation where the lsmod does not show drbd anymore, but /proc/drbd being still there (but no longer accessible). I'd rather have rmmod fail up front in this case. And try_module_get() seemed most appropriate. Lars