From bfae29e9c210e565a8ac12c9e24862cccaf9b883 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 11 Oct 2010 16:05:26 -0400 Subject: [PATCH] name cache: nfs41_lookup() inserts negative entry on NOENT Signed-off-by: Casey Bodley --- daemon/lookup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/lookup.c b/daemon/lookup.c index 09f0899..8f81b0b 100644 --- a/daemon/lookup.c +++ b/daemon/lookup.c @@ -227,7 +227,11 @@ static int server_lookup( } for (i = 0; i < count; i++) { + if (res->lookup[i].status == NFS4ERR_NOENT) + nfs41_name_cache_insert(session_name_cache(session), + path, args->lookup[i].name, NULL, NULL, NULL); status = res->lookup[i].status; if (status) break; + if (res->getfh[i].status == NFS4ERR_MOVED) { /* save enough information to follow the referral */ path_fh_copy(&res->referral->parent, file);