From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [Patch] VFS : mount lock scalability for files systems without mount point (WAS vfsmount lock issues on very large ppc64 box) Date: Thu, 21 Jul 2011 21:40:42 +0100 Message-ID: <20110721204042.GB31405@ZenIV.linux.org.uk> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: 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: <1311093158.2707.75.camel@schen9-DESK> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Jul 19, 2011 at 09:32:38AM -0700, Tim Chen wrote: > @@ -1193,6 +1193,7 @@ static void __exit cleanup_mtdchar(void) > { > unregister_mtd_user(&mtdchar_notifier); > mntput(mtd_inode_mnt); > + kern_unmount(mtd_inode_mnt); Surely you want to merge that mntput() in there... > +void kern_unmount(struct vfsmount *mnt) > +{ > + /* release long term mount so mount point can be released */ > + if (!IS_ERR_OR_NULL(mnt)) { > + mnt_make_shortterm(mnt); > + mntput(); > + } > +} ... and if you pass it the argument, it'll be much happier.