Fix for a bug in nfs_mkdir() that called vrele() instead of vput()
in the error cases, causing panics. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com Reviewed by: rwatson
This commit is contained in:
parent
d8b8e875a2
commit
74f44849b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138204
@ -1824,7 +1824,7 @@ nfs_mkdir(struct vop_mkdir_args *ap)
|
||||
*/
|
||||
if (error == EEXIST || (!error && !gotvp)) {
|
||||
if (newvp) {
|
||||
vrele(newvp);
|
||||
vput(newvp);
|
||||
newvp = NULL;
|
||||
}
|
||||
error = nfs_lookitup(dvp, cnp->cn_nameptr, len, cnp->cn_cred,
|
||||
@ -1837,7 +1837,7 @@ nfs_mkdir(struct vop_mkdir_args *ap)
|
||||
}
|
||||
if (error) {
|
||||
if (newvp)
|
||||
vrele(newvp);
|
||||
vput(newvp);
|
||||
} else
|
||||
*ap->a_vpp = newvp;
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user