Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757328AbXLJTg4 (ORCPT ); Mon, 10 Dec 2007 14:36:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756495AbXLJTgr (ORCPT ); Mon, 10 Dec 2007 14:36:47 -0500 Received: from smtp2.linux-foundation.org ([207.189.120.14]:57549 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbXLJTgq (ORCPT ); Mon, 10 Dec 2007 14:36:46 -0500 Date: Mon, 10 Dec 2007 11:35:19 -0800 From: Andrew Morton To: "Denis V. Lunev" Cc: Petr Vandrovec , "Eric W. Biederman" , Alexey Dobriyan , rjw@sisk.pl, trond.myklebust@fys.uio.no, gnome42@gmail.com, linux-kernel@vger.kernel.org, bfields@fieldses.org, den@openvz.org, Pavel Emelyanov Subject: Re: [PATCH 2.6.24-rc4] proc: Remove/Fix proc generic d_revalidate Message-Id: <20071210113519.00d4d361.akpm@linux-foundation.org> In-Reply-To: <475D3FE2.202@sw.ru> References: <1197067918.10831.13.camel@heimdal.trondhjem.org> <20071207151444.af5d8e11.akpm@linux-foundation.org> <200712080043.29292.rjw@sisk.pl> <20071208000043.GC1951@martell.zuzino.mipt.ru> <20071207161508.afe8fdf1.akpm@linux-foundation.org> <475CA9EA.1090405@vc.cvut.cz> <475D3FE2.202@sw.ru> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2738 Lines: 91 On Mon, 10 Dec 2007 16:32:18 +0300 "Denis V. Lunev" wrote: > Plese don't top-post. It makes replying to you rather awkward. > could you, plz, check patch sent by Eric above in this thread. > > I have tried it on my test node and it works for module you have > provided. The problem exists without it. > When Peter says "with your patch in place" I assume that he's referring to Eric's latest patch, namely. --- a/fs/proc/generic.c~proc-remove-fix-proc-generic-d_revalidate +++ a/fs/proc/generic.c @@ -374,16 +374,9 @@ static int proc_delete_dentry(struct den return 1; } -static int proc_revalidate_dentry(struct dentry *dentry, struct nameidata *nd) -{ - d_drop(dentry); - return 0; -} - static struct dentry_operations proc_dentry_operations = { .d_delete = proc_delete_dentry, - .d_revalidate = proc_revalidate_dentry, }; /* So we still have problems, it appears. > > Petr Vandrovec wrote: > > Eric W. Biederman wrote: > >> Ultimately to implement /proc perfectly we need an implementation > >> of d_revalidate because files and directories can be removed behind > >> the back of the VFS, and d_revalidate is the only way we can let > >> the VFS know that this has happened. > >> > >> So until we get a proper test for keeping dentries in the dcache > >> fix the current d_revalidate method by completely removing it. This > >> returns us to the current status quo. > > > > Hello, > > I know that I'm late to the party, but mount points is not only > > problem with d_revalidate. With your patch in place module below gets > > refcount incremented by two every time I do 'ls -la /proc/fs/vmblock'. > > > > > > #include > > #include > > #include > > > > static int vmblockinit(void) { > > struct proc_dir_entry *controlProcDirEntry; > > > > /* Create /proc/fs/vmblock */ > > controlProcDirEntry = proc_mkdir("vmblock", proc_root_fs); > > if (!controlProcDirEntry) { > > printk(KERN_DEBUG "Bad...\n"); > > return -EINVAL; > > } > > controlProcDirEntry->owner = THIS_MODULE; > > return 0; > > } > > > > static void vmblockexit(void) { > > remove_proc_entry("vmblock", proc_root_fs); > > } > > > > module_init(vmblockinit); > > module_exit(vmblockexit); > > > > > > (code comes from VMware's vmblock module, > > http://sourceforge.net/project/showfiles.php?group_id=204462) > > Thanks, > > Petr > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/