When removing a sillyrename file, make sure that the directory vnode
has not been cleaned in the meantime, since this can happen during a forced unmount. Also add a comment that nfs_removeit() should really be locking the directory vnode before calling nfs_removerpc(). Reported by: mbr Tested by: mbr MFC after: 1 week
This commit is contained in:
parent
504f8e7cb9
commit
df12c16630
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116260
@ -1463,6 +1463,12 @@ int
|
||||
nfs_removeit(struct sillyrename *sp)
|
||||
{
|
||||
|
||||
/*
|
||||
* Make sure that the directory vnode is still valid.
|
||||
* XXX we should lock sp->s_dvp here.
|
||||
*/
|
||||
if (sp->s_dvp->v_type == VBAD)
|
||||
return (0);
|
||||
return (nfs_removerpc(sp->s_dvp, sp->s_name, sp->s_namlen, sp->s_cred,
|
||||
NULL));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user