introduce iterate_dir() and dir_context
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / nfsd / vfs.c
index 81325ba8660aedf61b9ddc39acd066154a1d9961..39098d186af12e9252c60c669c45ca9fb76f11de 100644 (file)
@@ -1950,6 +1950,7 @@ struct buffered_dirent {
 };
 
 struct readdir_data {
+       struct dir_context ctx;
        char            *dirent;
        size_t          used;
        int             full;
@@ -1987,6 +1988,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);
@@ -2001,7 +2003,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;