summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
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/kern/kern_shutdown.c
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/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 7bbd98f..c3de8c1f 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -255,7 +255,7 @@ static int
isbufbusy(struct buf *bp)
{
if (((bp->b_flags & (B_INVAL | B_PERSISTENT)) == 0 &&
- BUF_REFCNT(bp) > 0) ||
+ BUF_ISLOCKED(bp)) ||
((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI))
return (1);
return (0);
OpenPOWER on IntegriCloud