[readdir] introduce iterate_dir() and dir_context
[sfrench/cifs-2.6.git] / arch / parisc / hpux / fs.c
index 838b479a42c4ebf0ea2a1e186a8f08891de37a2e..fc2cbee86e349e77fa85a46376570d67bacd091c 100644 (file)
@@ -60,6 +60,7 @@ struct hpux_dirent {
 };
 
 struct getdents_callback {
+       struct dir_context ctx;
        struct hpux_dirent __user *current_dir;
        struct hpux_dirent __user *previous;
        int count;
@@ -121,8 +122,9 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned i
        buf.previous = NULL;
        buf.count = count;
        buf.error = 0;
+       buf.ctx.actor = filldir;
 
-       error = vfs_readdir(arg.file, filldir, &buf);
+       error = iterate_dir(arg.file, &buf.ctx);
        if (error >= 0)
                error = buf.error;
        lastdirent = buf.previous;