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
|
|
@ -1140,7 +1140,8 @@ out:
|
|||
int nfs41_remove(
|
||||
IN nfs41_session *session,
|
||||
IN nfs41_path_fh *parent,
|
||||
IN const nfs41_component *target)
|
||||
IN const nfs41_component *target,
|
||||
IN uint64_t fileid)
|
||||
{
|
||||
int status;
|
||||
nfs41_compound compound;
|
||||
|
|
@ -1194,7 +1195,7 @@ int nfs41_remove(
|
|||
/* remove the target file from the cache */
|
||||
AcquireSRWLockShared(&parent->path->lock);
|
||||
nfs41_name_cache_remove(session_name_cache(session),
|
||||
parent->path->path, target, &remove_res.cinfo);
|
||||
parent->path->path, target, fileid, &remove_res.cinfo);
|
||||
ReleaseSRWLockShared(&parent->path->lock);
|
||||
|
||||
nfs41_superblock_space_changed(parent->fh.superblock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue