[readdir] introduce iterate_dir() and dir_context
[deliverable/linux.git] / fs / nfsd / vfs.c
index 84ce601d80632ba1dd090cd319766cecbe4cac98..f939ba9bf8e8adc357899817c6d6aaacb18048cd 100644 (file)
@@ -1912,6 +1912,7 @@ struct buffered_dirent {
 };
 
 struct readdir_data {
+       struct dir_context ctx;
        char            *dirent;
        size_t          used;
        int             full;
@@ -1949,6 +1950,7 @@ static __be32 nfsd_buffered_readdir(struct file *file, filldir_t func,
        int size;
        loff_t offset;
 
+       buf.ctx.actor = nfsd_buffered_filldir;
        buf.dirent = (void *)__get_free_page(GFP_KERNEL);
        if (!buf.dirent)
                return nfserrno(-ENOMEM);
@@ -1963,7 +1965,7 @@ static __be32 nfsd_buffered_readdir(struct file *file, filldir_t func,
                buf.used = 0;
                buf.full = 0;
 
-               host_err = vfs_readdir(file, nfsd_buffered_filldir, &buf);
+               host_err = iterate_dir(file, &buf.ctx);
                if (buf.full)
                        host_err = 0;
 
This page took 0.027063 seconds and 5 git commands to generate.