orangefs: saner arguments passing in readdir guts
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 20 Apr 2023 19:36:12 +0000 (15:36 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Dec 2023 17:53:36 +0000 (12:53 -0500)
commit12c0c3a65a0f399e9bb582350314d59960e62919
tree397e73f4e51db0e263e959a0b645dfacd4309d40
parentfda43691041c7ee685da903641402a0f913fe9e9
orangefs: saner arguments passing in readdir guts

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: Al Viro <viro@zeniv.linux.org.uk>
fs/orangefs/dir.c