Fix a vnode reference leak in the ktrace code. We always grab a reference

to the vnode at the start of ktr_writerequest() but were missing the
corresponding vrele() after we finished the write operation.

Reported by:	jasone
This commit is contained in:
John Baldwin 2006-01-23 21:45:32 +00:00
parent 129518ec2c
commit 704c9f00fb

View File

@ -952,6 +952,7 @@ ktr_writerequest(struct thread *td, struct ktr_request *req)
error = VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, cred);
VOP_UNLOCK(vp, 0, td);
vn_finished_write(mp);
vrele(vp);
mtx_unlock(&Giant);
if (!error)
return;