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:
parent
06b025a89c
commit
f988c89bf4
7 changed files with 29 additions and 12 deletions
|
|
@ -676,7 +676,8 @@ static void cancel_open(IN nfs41_upcall *upcall)
|
|||
/* break any delegations and truncate before REMOVE */
|
||||
nfs41_delegation_return(state->session, &state->file,
|
||||
OPEN_DELEGATE_WRITE, TRUE);
|
||||
status = nfs41_remove(state->session, &state->parent, name);
|
||||
status = nfs41_remove(state->session, &state->parent,
|
||||
name, state->file.fh.fileid);
|
||||
if (status)
|
||||
dprintf(1, "cancel_open: nfs41_remove() failed with %s\n",
|
||||
nfs_error_string(status));
|
||||
|
|
@ -735,7 +736,8 @@ static int handle_close(nfs41_upcall *upcall)
|
|||
OPEN_DELEGATE_WRITE, TRUE);
|
||||
|
||||
dprintf(1, "calling nfs41_remove for %s\n", name->name);
|
||||
rm_status = nfs41_remove(state->session, &state->parent, name);
|
||||
rm_status = nfs41_remove(state->session, &state->parent,
|
||||
name, state->file.fh.fileid);
|
||||
if (rm_status) {
|
||||
dprintf(1, "nfs41_remove() failed with error %s.\n",
|
||||
nfs_error_string(rm_status));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue