From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [Patch] VFS : mount lock scalability for files systems without mount point (WAS vfsmount lock issues on very large ppc64 box) Date: Sat, 23 Jul 2011 09:24:11 -0400 Message-ID: <20110723132411.GA22183@infradead.org> References: <20110717105027.53cc3ca4@kryten> <20110717010427.GC5359@parisc-linux.org> <20110717084630.GC8006@one.firstfloor.org> <1310977028.5756.1.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <20110718154008.GA29593@infradead.org> <20110718155141.GA11013@ZenIV.linux.org.uk> <1311093158.2707.75.camel@schen9-DESK> <20110721204042.GB31405@ZenIV.linux.org.uk> <1311294452.2576.18.camel@schen9-DESK> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , Christoph Hellwig , Eric Dumazet , Andi Kleen , Matthew Wilcox , Anton Blanchard , npiggin@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Tim Chen Return-path: Content-Disposition: inline In-Reply-To: <1311294452.2576.18.camel@schen9-DESK> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org I think you actually want this done in kern_mount_data, as both ipc and proc want long-term references as well. I also suspect with additional creep of container awareness more internal mounts will switch to kern_mount_data. Al, what do you think about simply passing the private data argument to kern_mount and kill kern_mount_data? It's not like the additional argument is going to cause us any pain. > +struct vfsmount *kern_mount(struct file_system_type *type) > +{ > + struct vfsmount *mnt; > + > + mnt = kern_mount_data(type, NULL); > + if (!IS_ERR(mnt)) { > + /* it is a longterm mount, don't release mnt until */ > + /* we unmount before file sys is unregistered */ Please use normal kernel comment style, e.g. /* * This is a longterm mount, don't release mnt until we umount * it just before unregister_filesystem(). */ Adding proper kerneldoc comments for the kern_mount/umount function that explain things in more detail would also be nice.