diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-15 18:49:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 04:46:47 -0400 |
commit | bb6f619b3a49f940d7478112500da312d70866eb (patch) | |
tree | 4e17d6ed5b965eaec2e55b11b61145b200d28f0f /fs/exportfs/expfs.c | |
parent | 5c0ba4e0762e6dabd14a5c276652e2defec38de7 (diff) |
[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>
Diffstat (limited to 'fs/exportfs/expfs.c')
-rw-r--r-- | fs/exportfs/expfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 7cb190426cec..6c8ef1dd4bdf 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -272,7 +272,7 @@ static int get_name(const struct path *path, char *name, struct dentry *child) | |||
272 | goto out; | 272 | goto out; |
273 | 273 | ||
274 | error = -EINVAL; | 274 | error = -EINVAL; |
275 | if (!file->f_op->readdir) | 275 | if (!file->f_op->readdir && !file->f_op->iterate) |
276 | goto out_close; | 276 | goto out_close; |
277 | 277 | ||
278 | buffer.name = name; | 278 | buffer.name = name; |