diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-30 12:45:35 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-05 00:58:40 -0400 |
| commit | c14acb19a4b1482b6dd6e9d0874b2c8e32d6599d (patch) | |
| tree | 09449801fb0b88b73bdbb83876f251a65a2120ac /include/linux | |
| parent | 1fcb9d4b03b6ad6f4de417bbbe21d82123290114 (diff) | |
NFS: Fix spurious readdir cookie loop messages
commit 0c0308066ca53fdf1423895f3a42838b67b3a5a8 upstream.
If the directory contents change, then we have to accept that the
file->f_pos value may shrink if we do a 'search-by-cookie'. In that
case, we should turn off the loop detection and let the NFS client
try to recover.
The patch also fixes a second loop detection bug by ensuring
that after turning on the ctx->duped flag, we read at least one new
cookie into ctx->dir_cookie before attempting to match with
ctx->dup_cookie.
Reported-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs_fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1b93b9c60e5..b522370fcc2 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -99,9 +99,10 @@ struct nfs_open_context { | |||
| 99 | 99 | ||
| 100 | struct nfs_open_dir_context { | 100 | struct nfs_open_dir_context { |
| 101 | struct rpc_cred *cred; | 101 | struct rpc_cred *cred; |
| 102 | unsigned long attr_gencount; | ||
| 102 | __u64 dir_cookie; | 103 | __u64 dir_cookie; |
| 103 | __u64 dup_cookie; | 104 | __u64 dup_cookie; |
| 104 | int duped; | 105 | signed char duped; |
| 105 | }; | 106 | }; |
| 106 | 107 | ||
| 107 | /* | 108 | /* |
