• Al Viro's avatar
    orangefs: saner arguments passing in readdir guts · 12c0c3a6
    Al Viro authored
    orangefs_dir_fill() doesn't use oi and dentry arguments at all
    do_readdir() gets dentry, uses only dentry->d_inode; it also
    gets oi, which is ORANGEFS_I(dentry->d_inode) (i.e. ->d_inode -
    constant offset).
    orangefs_dir_mode() gets dentry and oi, uses only to pass those
    to do_readdir().
    orangefs_dir_iterate() uses dentry and oi only to pass those to
    orangefs_dir_fill() and orangefs_dir_more().
    
    The only thing it really needs is ->d_inode; moreover, that's
    better expressed as file_inode(file) - no need to go through
    ->f_path.dentry->d_inode.
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    12c0c3a6
dir.c 8.93 KB