diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-15 13:52:59 -0400 |
---|---|---|
committer | Pawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local> | 2015-03-27 14:37:33 +0100 |
commit | ce306d01f07780b85ae43bfe2242d35f6e4ccf94 (patch) | |
tree | e2561b95b0853eee9d3306c2aef1ad11ce927c69 /arch/alpha/kernel/osf_sys.c | |
parent | faadf151bfee5e52c2333ddf6c7805143a52a339 (diff) | |
download | linux-3.10-ce306d01f07780b85ae43bfe2242d35f6e4ccf94.tar.gz linux-3.10-ce306d01f07780b85ae43bfe2242d35f6e4ccf94.tar.bz2 linux-3.10-ce306d01f07780b85ae43bfe2242d35f6e4ccf94.zip |
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/alpha/kernel/osf_sys.c')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index b9e37ad6fa1..ac19c7299d8 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -96,6 +96,7 @@ struct osf_dirent { }; struct osf_dirent_callback { + struct dir_context ctx; struct osf_dirent __user *dirent; long __user *basep; unsigned int count; @@ -155,8 +156,9 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd, buf.basep = basep; buf.count = count; buf.error = 0; + buf.ctx.actor = osf_filldir; - error = vfs_readdir(arg.file, osf_filldir, &buf); + error = iterate_dir(arg.file, &buf.ctx); if (error >= 0) error = buf.error; if (count != buf.count) |