aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorOlivier Galibert <galibert@pobox.com>2005-06-22 13:16:29 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:33 -0400
commit00a926422765064cb28e218d4837411c88bf6a3e (patch)
tree1e9ad635821c7b037014307d1a2657dc56b17acf /fs/nfs/inode.c
parentae3884621bf5b4caff7785b9a417f262202965b2 (diff)
[PATCH] NFS: Hide NFS server-generated readdir cookies from userland
NFSv3 currently returns the unsigned 64-bit cookie directly to userspace. The following patch causes the kernel to generate loff_t offsets for the benefit of userland. The current server-generated READDIR cookie is cached in the nfs_open_context instead of in filp->f_pos, so we still end up work correctly under directory insertions/deletion. Signed-off-by: Olivier Galibert <galibert@pobox.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 8a8d57d9d660..9fa02e7984ac 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -891,6 +891,8 @@ struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rp
891 ctx->state = NULL; 891 ctx->state = NULL;
892 ctx->lockowner = current->files; 892 ctx->lockowner = current->files;
893 ctx->error = 0; 893 ctx->error = 0;
894 ctx->dir_pos = 0;
895 ctx->dir_cookie = 0;
894 } 896 }
895 return ctx; 897 return ctx;
896} 898}