Remove long-dead BUF_ASSERT_{,UN}HELD assertions
These were fully neutered in r177676 (2008), but not removed at the time for unclear reasons. They're totally dead code, so go ahead and yank them now. No functional change.
This commit is contained in:
parent
f80cbeb292
commit
a6935d085c
@ -2646,7 +2646,6 @@ nfs_strategy(struct vop_strategy_args *ap)
|
||||
KASSERT(bp->b_vp == vp, ("missing b_getvp"));
|
||||
KASSERT(!(bp->b_flags & B_DONE),
|
||||
("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp));
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
if (vp->v_type == VREG && bp->b_blkno == bp->b_lblkno)
|
||||
bp->b_blkno = bp->b_lblkno * (vp->v_bufobj.bo_bsize /
|
||||
@ -3224,8 +3223,6 @@ ncl_writebp(struct buf *bp, int force __unused, struct thread *td)
|
||||
{
|
||||
int oldflags, rtval;
|
||||
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
if (bp->b_flags & B_INVAL) {
|
||||
brelse(bp);
|
||||
return (0);
|
||||
|
@ -2225,8 +2225,6 @@ bufwrite(struct buf *bp)
|
||||
|
||||
oldflags = bp->b_flags;
|
||||
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
KASSERT(!(bp->b_vflags & BV_BKGRDINPROG),
|
||||
("FFS background buffer should not get here %p", bp));
|
||||
|
||||
@ -2353,7 +2351,6 @@ bdwrite(struct buf *bp)
|
||||
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
|
||||
KASSERT((bp->b_flags & B_BARRIER) == 0,
|
||||
("Barrier request in delayed write %p", bp));
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
if (bp->b_flags & B_INVAL) {
|
||||
brelse(bp);
|
||||
@ -2445,7 +2442,6 @@ bdirty(struct buf *bp)
|
||||
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
|
||||
KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE,
|
||||
("bdirty: buffer %p still on queue %d", bp, bp->b_qindex));
|
||||
BUF_ASSERT_HELD(bp);
|
||||
bp->b_flags &= ~(B_RELBUF);
|
||||
bp->b_iocmd = BIO_WRITE;
|
||||
|
||||
@ -2475,7 +2471,6 @@ bundirty(struct buf *bp)
|
||||
KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
|
||||
KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE,
|
||||
("bundirty: buffer %p still on queue %d", bp, bp->b_qindex));
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
if (bp->b_flags & B_DELWRI) {
|
||||
bp->b_flags &= ~B_DELWRI;
|
||||
@ -4090,7 +4085,6 @@ getblkx(struct vnode *vp, daddr_t blkno, int size, int slpflag, int slptimeo,
|
||||
bp->b_flags &= ~B_DONE;
|
||||
}
|
||||
CTR4(KTR_BUF, "getblk(%p, %ld, %d) = %p", vp, (long)blkno, size, bp);
|
||||
BUF_ASSERT_HELD(bp);
|
||||
end:
|
||||
buf_track(bp, __func__);
|
||||
KASSERT(bp->b_bufobj == bo,
|
||||
@ -4118,7 +4112,6 @@ geteblk(int size, int flags)
|
||||
allocbuf(bp, size);
|
||||
bufspace_release(bufdomain(bp), maxsize);
|
||||
bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */
|
||||
BUF_ASSERT_HELD(bp);
|
||||
return (bp);
|
||||
}
|
||||
|
||||
@ -4215,8 +4208,6 @@ allocbuf(struct buf *bp, int size)
|
||||
{
|
||||
int newbsize;
|
||||
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
if (bp->b_bcount == size)
|
||||
return (1);
|
||||
|
||||
@ -4402,7 +4393,6 @@ bufdone(struct buf *bp)
|
||||
dropobj = NULL;
|
||||
|
||||
KASSERT(!(bp->b_flags & B_DONE), ("biodone: bp %p already done", bp));
|
||||
BUF_ASSERT_HELD(bp);
|
||||
|
||||
runningbufwakeup(bp);
|
||||
if (bp->b_iocmd == BIO_WRITE)
|
||||
|
@ -359,15 +359,11 @@ extern const char *buf_wmesg; /* Default buffer lock message */
|
||||
_lockmgr_assert(&(bp)->b_lock, KA_XLOCKED, LOCK_FILE, LOCK_LINE)
|
||||
#define BUF_ASSERT_UNLOCKED(bp) \
|
||||
_lockmgr_assert(&(bp)->b_lock, KA_UNLOCKED, LOCK_FILE, LOCK_LINE)
|
||||
#define BUF_ASSERT_HELD(bp)
|
||||
#define BUF_ASSERT_UNHELD(bp)
|
||||
#else
|
||||
#define BUF_ASSERT_LOCKED(bp)
|
||||
#define BUF_ASSERT_SLOCKED(bp)
|
||||
#define BUF_ASSERT_XLOCKED(bp)
|
||||
#define BUF_ASSERT_UNLOCKED(bp)
|
||||
#define BUF_ASSERT_HELD(bp)
|
||||
#define BUF_ASSERT_UNHELD(bp)
|
||||
#endif
|
||||
|
||||
#ifdef _SYS_PROC_H_ /* Avoid #include <sys/proc.h> pollution */
|
||||
|
Loading…
Reference in New Issue
Block a user