vfs_hash_insert() vputs() the losing vnode before returning, in the event of

a race where a duplicate vnode is entered into the vfs hash. nfs_nget() shouldn't
be releasing the vnode in that case.
This commit is contained in:
Mohan Srinivasan 2006-11-16 23:03:46 +00:00
parent 87c125cecc
commit 3c2fcc3c92
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164346

View File

@ -159,8 +159,7 @@ nfs_nget(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp, int
return (error);
if (nvp != NULL) {
*npp = VTONFS(nvp);
/* vrele() the duplicate allocated here, to get it recycled */
vrele(vp);
/* vfs_hash_insert() vput()'s the losing vnode */
return (0);
}
if (fhsize > NFS_SMALLFH) {