[readdir] introduce iterate_dir() and dir_context
[deliverable/linux.git] / fs / ecryptfs / file.c
index a7abbea2c09638ef8c190555ec466834c0c06edf..041379a646b3c2fb89621b0fcaf3278365281c93 100644 (file)
@@ -68,6 +68,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
 }
 
 struct ecryptfs_getdents_callback {
+       struct dir_context ctx;
        void *dirent;
        struct dentry *dentry;
        filldir_t filldir;
@@ -126,7 +127,8 @@ static int ecryptfs_readdir(struct file *file, void *dirent, filldir_t filldir)
        buf.filldir = filldir;
        buf.filldir_called = 0;
        buf.entries_written = 0;
-       rc = vfs_readdir(lower_file, ecryptfs_filldir, (void *)&buf);
+       buf.ctx.actor = ecryptfs_filldir;
+       rc = iterate_dir(lower_file, &buf.ctx);
        file->f_pos = lower_file->f_pos;
        if (rc < 0)
                goto out;
This page took 0.026534 seconds and 5 git commands to generate.