From 8ef2ce3e16d9bec6cf015207c1c82a5b864046ac Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Wed, 23 Mar 2011 15:04:31 -0400 Subject: NFS: Detect loops in a readdir due to bad cookies Some filesystems (such as ext4) can return the same cookie value for multiple files. If we try to start a readdir with one of these cookies, the server will return the first file found with a cookie of the same value. This can cause the client to enter an infinite loop. Signed-off-by: Bryan Schumaker Signed-off-by: Trond Myklebust --- include/linux/nfs_fs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/nfs_fs.h') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 4b851a02f7f3..4179c368844b 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -100,6 +100,8 @@ struct nfs_open_context { struct nfs_open_dir_context { struct rpc_cred *cred; __u64 dir_cookie; + __u64 dup_cookie; + int duped; }; /* -- cgit v1.2.3