summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-22 16:34:19 -0400
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>2015-03-27 14:37:40 +0100
commita4ea0daecb314dbe2e4a3c9408fe8ca2820861c7 (patch)
treedc59dffc315d9da8cdeb5844cafd804f994dd460
parent5cffa97cd66f5c59d9011e3ab2273582b8047cc6 (diff)
downloadlinux-3.10-a4ea0daecb314dbe2e4a3c9408fe8ca2820861c7.tar.gz
linux-3.10-a4ea0daecb314dbe2e4a3c9408fe8ca2820861c7.tar.bz2
linux-3.10-a4ea0daecb314dbe2e4a3c9408fe8ca2820861c7.zip
convert hostfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/hostfs/hostfs_kern.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 32f35f18798..cddb0521751 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -277,7 +277,7 @@ static const struct super_operations hostfs_sbops = {
.show_options = hostfs_show_options,
};
-int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)
+int hostfs_readdir(struct file *file, struct dir_context *ctx)
{
void *dir;
char *name;
@@ -292,12 +292,11 @@ int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)
__putname(name);
if (dir == NULL)
return -error;
- next = file->f_pos;
+ next = ctx->pos;
while ((name = read_dir(dir, &next, &ino, &len, &type)) != NULL) {
- error = (*filldir)(ent, name, len, file->f_pos,
- ino, type);
- if (error) break;
- file->f_pos = next;
+ if (!dir_emit(ctx, name, len, ino, type))
+ break;
+ ctx->pos = next;
}
close_dir(dir);
return 0;
@@ -393,7 +392,7 @@ static const struct file_operations hostfs_file_fops = {
static const struct file_operations hostfs_dir_fops = {
.llseek = generic_file_llseek,
- .readdir = hostfs_readdir,
+ .iterate = hostfs_readdir,
.read = generic_read_dir,
};