[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)
committerMohamad Ayyash <mkayyash@google.com>
Wed, 4 Mar 2015 19:15:29 +0000 (11:15 -0800)
commit83fd542759010949ac7d9638b615fac1bb9744e1
treed5b42b25e5c7b0d92908fc504ae892ef50826506
parentc301a0e047e401d41b26db1009d08e088ae2365a
[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