diff options
author | trasz <trasz@FreeBSD.org> | 2009-02-06 18:16:01 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2009-02-06 18:16:01 +0000 |
commit | d102122bd0838dfffdce66a0c2a7a5dded257d04 (patch) | |
tree | 94e9218259a410370a7c88714ba4e7501f04c571 /sys/kern/vfs_subr.c | |
parent | e0aa6f81f98bad4fc91bab83c82424bcfd95feed (diff) | |
download | FreeBSD-src-d102122bd0838dfffdce66a0c2a7a5dded257d04.zip FreeBSD-src-d102122bd0838dfffdce66a0c2a7a5dded257d04.tar.gz |
Add KASSERTs to make it easier to debug problems like the one fixed
in r188141.
Reviewed by: kib,attilio
Approved by: rwatson (mentor)
Tested by: pho
Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c97c2a9..952b3a4 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -381,6 +381,7 @@ vfs_unbusy(struct mount *mp) CTR2(KTR_VFS, "%s: mp %p", __func__, mp); MNT_ILOCK(mp); MNT_REL(mp); + KASSERT(mp->mnt_lockref > 0, ("negative mnt_lockref")); mp->mnt_lockref--; if (mp->mnt_lockref == 0 && (mp->mnt_kern_flag & MNTK_DRAINING) != 0) { MPASS(mp->mnt_kern_flag & MNTK_UNMOUNT); |