diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-15 17:52:59 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 08:46:46 (GMT) |
commit | 5c0ba4e0762e6dabd14a5c276652e2defec38de7 (patch) | |
tree | cc2c94d81a631b0656782e1f8299da3267871964 /arch/parisc/hpux | |
parent | 83a8761142cb38536e9e88dfc2432d331ea4e257 (diff) | |
download | linux-fsl-qoriq-5c0ba4e0762e6dabd14a5c276652e2defec38de7.tar.xz |
[readdir] introduce iterate_dir() and dir_context
iterate_dir(): new helper, replacing vfs_readdir().
struct dir_context: contains the readdir callback (and will get more stuff
in it), embedded into whatever data that callback wants to deal with;
eventually, we'll be passing it to ->readdir() replacement instead of
(data,filldir) pair.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/parisc/hpux')
-rw-r--r-- | arch/parisc/hpux/fs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 838b479..fc2cbee 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c @@ -60,6 +60,7 @@ struct hpux_dirent { }; struct getdents_callback { + struct dir_context ctx; struct hpux_dirent __user *current_dir; struct hpux_dirent __user *previous; int count; @@ -121,8 +122,9 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i buf.previous = NULL; buf.count = count; buf.error = 0; + buf.ctx.actor = filldir; - error = vfs_readdir(arg.file, filldir, &buf); + error = iterate_dir(arg.file, &buf.ctx); if (error >= 0) error = buf.error; lastdirent = buf.previous; |