From: Trond Myklebust Date: Tue, 7 Dec 2010 17:41:58 +0000 (-0500) Subject: NFS: nfs_readdir_search_for_cookie() don't mark as eof if cookie not found X-Git-Tag: upstream/snapshot3+hdmi~12287^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18fb5fe40ce7f789b5cfc3aa81ff1e6175b0a5be;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 --- 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;