aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-12-07 12:41:58 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-12-07 12:41:58 -0500
commit18fb5fe40ce7f789b5cfc3aa81ff1e6175b0a5be (patch)
treee7d191c921142ecb1cb2eba0634cb0c6ba89459d /fs/nfs/dir.c
parent11de3b11e08cac26d59e88efaf4e316701883552 (diff)
NFS: nfs_readdir_search_for_cookie() don't mark as eof if cookie not found
If we're searching for a specific cookie, and it isn't found in the page cache, we should try an uncached_readdir(). To do so, we return EBADCOOKIE, but we don't set desc->eof. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d529e0e99efa..ad2fde23446d 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -316,8 +316,9 @@ int nfs_readdir_search_for_cookie(struct nfs_cache_array *array, nfs_readdir_des
316 } 316 }
317 } 317 }
318 if (i == array->eof_index) { 318 if (i == array->eof_index) {
319 desc->eof = 1;
320 status = -EBADCOOKIE; 319 status = -EBADCOOKIE;
320 if (*desc->dir_cookie == array->last_cookie)
321 desc->eof = 1;
321 } 322 }
322out: 323out:
323 return status; 324 return status;