[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291760208-11251-1-git-send-email-Trond.Myklebust@netapp.com>
Date: Tue, 7 Dec 2010 17:16:47 -0500
From: Trond Myklebust <Trond.Myklebust@...app.com>
To: linux-nfs@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] 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@...app.com>
---
fs/nfs/dir.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index d529e0e..ad2fde2 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
}
}
if (i == array->eof_index) {
- desc->eof = 1;
status = -EBADCOOKIE;
+ if (*desc->dir_cookie == array->last_cookie)
+ desc->eof = 1;
}
out:
return status;
--
1.7.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists