From 909947f07a8d805eb047af79dbdf503c9dc02c1d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 19 Jan 2012 15:06:50 -0500 Subject: [PATCH] name cache: bug fix for delegations when open_update_cache() calls open_delegation_return() to return its delegation, it doesn't update its local variable 'delegation_type' to reflect the new delegation->type. this causes the next call to nfs41_name_cache_insert() to continue failing Signed-off-by: Casey Bodley --- daemon/nfs41_ops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/nfs41_ops.c b/daemon/nfs41_ops.c index 5886fe1..2141564 100644 --- a/daemon/nfs41_ops.c +++ b/daemon/nfs41_ops.c @@ -340,8 +340,6 @@ static void open_update_cache( IN nfs41_getattr_res *file_attrs) { struct nfs41_name_cache *cache = session_name_cache(session); - enum open_delegation_type4 delegation_type = - already_delegated ? OPEN_DELEGATE_NONE : delegation->type; uint32_t status; /* update the attributes of the parent directory */ @@ -355,7 +353,8 @@ static void open_update_cache( retry_cache_insert: AcquireSRWLockShared(&file->path->lock); status = nfs41_name_cache_insert(cache, file->path->path, &file->name, - &file->fh, file_attrs->info, changeinfo, delegation_type); + &file->fh, file_attrs->info, changeinfo, + already_delegated ? OPEN_DELEGATE_NONE : delegation->type); ReleaseSRWLockShared(&file->path->lock); if (status == ERROR_TOO_MANY_OPEN_FILES) {