Linux Kernel - Refreshing VFS Dentry Cache

Posted by Mike D on Stack Overflow See other posts from Stack Overflow or by Mike D
Published on 2010-04-25T00:25:09Z Indexed on 2010/04/25 0:33 UTC
Read the original article Hit count: 565

Filed under:
|

I wrote a system call that opens a directory and gets the file object and the dentry struct. Im trying to list all entries including entries in subdirectories using the list_for_each() macro. The problem is its only displaying whats currently in the dentry cache. If I open the directory with nautilus then rerun the system call, all the entries are listed. Is there a way to check the exact list of entries or refresh the cache?

f = s_open(tpath);

fle = fget(f);
d = fle->f_path.dentry;
    list_for_each ( position ,  &d->d_subdirs ) {  
        dtmp = list_entry(position, struct dentry, d_u.d_child);
    ...
}
sys_close(f);

© Stack Overflow or respective owner

Related posts about linux-kernel

Related posts about linux