diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2008-01-19 17:36:23 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2008-01-19 17:36:23 +0000 |
commit | d638e093d606088b4e716baabff1a3b9b17d45df (patch) | |
tree | deeb8f52e2572015da8df31f2b2f73a4def65428 /sys/nfsclient/nfs_subs.c | |
parent | de5910460abcef40b50be9ce72339c8d3df990fb (diff) | |
download | src-d638e093d606088b4e716baabff1a3b9b17d45df.tar.gz src-d638e093d606088b4e716baabff1a3b9b17d45df.zip |
- 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)
Notes
Notes:
svn path=/head/; revision=175486
Diffstat (limited to 'sys/nfsclient/nfs_subs.c')
-rw-r--r-- | sys/nfsclient/nfs_subs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index 4bbf0b031553..881b1a11f065 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -918,7 +918,7 @@ nfs_clearcommit(struct mount *mp) } MNT_IUNLOCK(mp); TAILQ_FOREACH_SAFE(bp, &vp->v_bufobj.bo_dirty.bv_hd, b_bobufs, nbp) { - if (BUF_REFCNT(bp) == 0 && + if (!BUF_ISLOCKED(bp) && (bp->b_flags & (B_DELWRI | B_NEEDCOMMIT)) == (B_DELWRI | B_NEEDCOMMIT)) bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); |