unwind v_writecount in fhopen() if we are unable to allocate the
descriptor. MFC after: 3 days
This commit is contained in:
parent
553b79aa63
commit
a06fe5111e
@ -3622,8 +3622,11 @@ fhopen(td, uap)
|
||||
* end of vn_open code
|
||||
*/
|
||||
|
||||
if ((error = falloc(td, &nfp, &indx)) != 0)
|
||||
if ((error = falloc(td, &nfp, &indx)) != 0) {
|
||||
if (fmode & FWRITE)
|
||||
vp->v_writecount--;
|
||||
goto bad;
|
||||
}
|
||||
fp = nfp;
|
||||
|
||||
/*
|
||||
|
@ -3622,8 +3622,11 @@ fhopen(td, uap)
|
||||
* end of vn_open code
|
||||
*/
|
||||
|
||||
if ((error = falloc(td, &nfp, &indx)) != 0)
|
||||
if ((error = falloc(td, &nfp, &indx)) != 0) {
|
||||
if (fmode & FWRITE)
|
||||
vp->v_writecount--;
|
||||
goto bad;
|
||||
}
|
||||
fp = nfp;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user