introduce iterate_dir() and dir_context
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / exportfs / expfs.c
index b4eec4c9a790d6ac1a5832ec013589339569fb45..95b32a6fb3b769314d6b81d2b03ce214161cd75f 100644 (file)
@@ -212,6 +212,7 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
 }
 
 struct getdents_callback {
+       struct dir_context ctx;
        char *name;             /* name that was found. It already points to a
                                   buffer NAME_MAX+1 is size */
        unsigned long ino;      /* the inum we are looking for */
@@ -278,10 +279,11 @@ static int get_name(const struct path *path, char *name, struct dentry *child)
        buffer.ino = child->d_inode->i_ino;
        buffer.found = 0;
        buffer.sequence = 0;
+       buffer.ctx.actor = filldir_one;
        while (1) {
                int old_seq = buffer.sequence;
 
-               error = vfs_readdir(file, filldir_one, &buffer);
+               error = iterate_dir(file, &buffer.ctx);
                if (buffer.found) {
                        error = 0;
                        break;