From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 0/4 v3] fs: Remove i_devices from struct inode Date: Tue, 4 Nov 2014 20:16:21 +0000 Message-ID: <20141104201620.GL7996@ZenIV.linux.org.uk> References: <1415096851-17209-1-git-send-email-jack@suse.cz> <20141104153940.GH7996@ZenIV.linux.org.uk> <54592D49.4070704@amacapital.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Christoph Hellwig , LKML , Linux FS Devel To: Andy Lutomirski Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Nov 04, 2014 at 11:52:22AM -0800, Andy Lutomirski wrote: > Let me try again, though: what if a chardev inode replaced i_cdev with > NULL and dropped its kobj reference in iput_final? This would add a > bit over overhead to things that repeatedly open and close the same > device node, but I doubt this matters much. How is it different from what Jan proposed? The whole problem is that iput_final() is too late. We could clean the reference on close, all right, and have it looked up again on every open, but I'm not at all sure that situation with opening/closing cdev is never a hot path, especially with udev playing silly buggers, etc.