lkml.org 
[lkml]   [2007]   [Dec]   [9]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 09 Dec 2007 18:52:26 -0800
FromPetr Vandrovec <>
SubjectRe: [PATCH 2.6.24-rc4] proc: Remove/Fix proc generic d_revalidate
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 <linux/kernel.h>
#include <linux/module.h>
#include <linux/proc_fs.h>

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



\
 
 \ /
  Last update: 2007-12-10 04:17    [from the cache]
©2003-2008