summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2011-03-23 15:04:31 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-23 15:14:27 -0400
commit8ef2ce3e16d9bec6cf015207c1c82a5b864046ac (patch)
tree35441fd695c4f5215ab0061d8df26b4cfd9a44f5 /include/linux
parent480c2006ebb44ae03165695db7b3e38c04e0d102 (diff)
downloadblackbird-obmc-linux-8ef2ce3e16d9bec6cf015207c1c82a5b864046ac.tar.gz
blackbird-obmc-linux-8ef2ce3e16d9bec6cf015207c1c82a5b864046ac.zip
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 <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs.h2
1 files changed, 2 insertions, 0 deletions
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;
};
/*
OpenPOWER on IntegriCloud