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 ( dentry ) {
...
}
sys_close(f);