diff options
author | attilio <attilio@FreeBSD.org> | 2008-01-19 17:36:23 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-01-19 17:36:23 +0000 |
commit | caa2ca048b3049232f35da2c8dc2e7b2cb199d71 (patch) | |
tree | deeb8f52e2572015da8df31f2b2f73a4def65428 /sys/kern/vfs_subr.c | |
parent | a45d8c6482b786edcfd7a9ec4556ff8c4e2fe2e4 (diff) | |
download | FreeBSD-src-caa2ca048b3049232f35da2c8dc2e7b2cb199d71.zip FreeBSD-src-caa2ca048b3049232f35da2c8dc2e7b2cb199d71.tar.gz |
- Introduce the function lockmgr_recursed() which returns true if the
lockmgr lkp, when held in exclusive mode, is recursed
- Introduce the function BUF_RECURSED() which does the same for bufobj
locks based on the top of lockmgr_recursed()
- Introduce the function BUF_ISLOCKED() which works like the counterpart
VOP_ISLOCKED(9), showing the state of lockmgr linked with the bufobj
BUF_RECURSED() and BUF_ISLOCKED() entirely replace the usage of bogus
BUF_REFCNT() in a more explicative and SMP-compliant way.
This allows us to axe out BUF_REFCNT() and leaving the function
lockcount() totally unused in our stock kernel. Further commits will
axe lockcount() as well as part of lockmgr() cleanup.
KPI results, obviously, broken so further commits will update manpages
and freebsd version.
Tested by: kris (on UFS and NFS)
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 953c1d8..2fe63b0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3570,7 +3570,7 @@ vop_strategy_pre(void *ap) if ((bp->b_flags & B_CLUSTER) != 0) return; - if (BUF_REFCNT(bp) < 1) { + if (!BUF_ISLOCKED(bp)) { if (vfs_badlock_print) printf( "VOP_STRATEGY: bp is not locked but should be\n"); |