summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-01-19 17:36:23 +0000
committerattilio <attilio@FreeBSD.org>2008-01-19 17:36:23 +0000
commitcaa2ca048b3049232f35da2c8dc2e7b2cb199d71 (patch)
treedeeb8f52e2572015da8df31f2b2f73a4def65428 /sys/ufs
parenta45d8c6482b786edcfd7a9ec4556ff8c4e2fe2e4 (diff)
downloadFreeBSD-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/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index ae3fbeb..66c152e 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1718,7 +1718,7 @@ ffs_bufwrite(struct buf *bp)
oldflags = bp->b_flags;
- if (BUF_REFCNT(bp) == 0)
+ if (!BUF_ISLOCKED(bp))
panic("bufwrite: buffer is not busy???");
s = splbio();
/*
OpenPOWER on IntegriCloud