In nfs_nget() if two threads race on the same filehandle, the loser should
cause the nfsnode to get freed. This fixes a potential vnode (and nfsnode) leak in that path. Submitted by: Mohan Srinivasan Reviewed by: phk
This commit is contained in:
parent
ca8316b8dd
commit
c30cfa7b9b
@ -154,7 +154,8 @@ nfs_nget(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp)
|
||||
return (error);
|
||||
if (nvp != NULL) {
|
||||
*npp = VTONFS(nvp);
|
||||
/* XXX I wonder of nfs_reclaim will survive the unused vnode */
|
||||
/* vrele() the duplicate allocated here, to get it recycled */
|
||||
vrele(vp);
|
||||
return (0);
|
||||
}
|
||||
if (fhsize > NFS_SMALLFH) {
|
||||
|
Loading…
Reference in New Issue
Block a user