namecache: fix for numlinks on remove

nfs41_name_cache_remove() needs to update the 'numlinks' attribute for other links, even if the file being removed is not found in the cache.  to search for its attr cache entry, nfs41_name_cache_remove() now requires a fileid argument.  nfs41_remove() only gets a pointer to the parent's filehandle, so it also needs the target fileid argument

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-11-04 10:17:17 -04:00 committed by unknown
parent 06b025a89c
commit f988c89bf4
7 changed files with 29 additions and 12 deletions

View file

@ -240,7 +240,8 @@ static int handle_symlink(nfs41_upcall *upcall)
eprintf("handle_symlink: attempting to create a symlink when "
"the file=%s was already created on open; sending REMOVE "
"first\n", state->file.path->path);
nfs41_remove(state->session, &state->parent, &state->file.name);
nfs41_remove(state->session, &state->parent,
&state->file.name, state->file.fh.fileid);
}
/* create the symlink */