[readdir] introduce ->iterate(), ctx->pos, dir_emit()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 15 May 2013 22:49:12 +0000 (18:49 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Jun 2013 08:46:47 +0000 (12:46 +0400)
commitbb6f619b3a49f940d7478112500da312d70866eb
tree4e17d6ed5b965eaec2e55b11b61145b200d28f0f
parent5c0ba4e0762e6dabd14a5c276652e2defec38de7
[readdir] introduce ->iterate(), ctx->pos, dir_emit()

New method - ->iterate(file, ctx).  That's the replacement for ->readdir();
it takes callback from ctx->actor, uses ctx->pos instead of file->f_pos and
calls dir_emit(ctx, ...) instead of filldir(data, ...).  It does *not*
update file->f_pos (or look at it, for that matter); iterate_dir() does the
update.

Note that dir_emit() takes the offset from ctx->pos (and eventually
filldir_t will lose that argument).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/parisc/hpux/fs.c
fs/coda/dir.c
fs/compat.c
fs/exportfs/expfs.c
fs/nfsd/nfs4recover.c
fs/readdir.c
include/linux/fs.h