diff options
author | dillon <dillon@FreeBSD.org> | 1999-09-27 00:21:43 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-09-27 00:21:43 +0000 |
commit | 510b76a3231122a74e1824a1c14c8871ebab2b17 (patch) | |
tree | 5288311a6c6297fc3ae075bcdad5a1e231fa767a /sys/sys/bio.h | |
parent | 69d7d3a5b457b03e8a4698834c824001fe2e05e7 (diff) | |
download | FreeBSD-src-510b76a3231122a74e1824a1c14c8871ebab2b17.zip FreeBSD-src-510b76a3231122a74e1824a1c14c8871ebab2b17.tar.gz |
Fix process p_locks accounting. Conversions of the owner to LK_KERNPROC
caused p_locks to be improperly accounted.
Submitted by: Tor.Egge@fast.no
Diffstat (limited to 'sys/sys/bio.h')
-rw-r--r-- | sys/sys/bio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h index f844985..ae4dbfd 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -315,7 +315,10 @@ static __inline void BUF_KERNPROC __P((struct buf *)); static __inline void BUF_KERNPROC(struct buf *bp) { + struct proc *p = curproc; + if (p != NULL && bp->b_lock.lk_lockholder == p->p_pid) + p->p_locks--; bp->b_lock.lk_lockholder = LK_KERNPROC; } /* |