aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index ff25e5b0043c..45be14b47207 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2639,6 +2639,13 @@ brelse(struct buf *bp)
return;
}
+ if (LIST_EMPTY(&bp->b_dep)) {
+ bp->b_flags &= ~B_IOSTARTED;
+ } else {
+ KASSERT((bp->b_flags & B_IOSTARTED) == 0,
+ ("brelse: SU io not finished bp %p", bp));
+ }
+
if ((bp->b_vflags & (BV_BKGRDINPROG | BV_BKGRDERR)) == BV_BKGRDERR) {
BO_LOCK(bp->b_bufobj);
bp->b_vflags &= ~BV_BKGRDERR;
@@ -2826,6 +2833,13 @@ bqrelse(struct buf *bp)
bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF);
bp->b_xflags &= ~(BX_CVTENXIO);
+ if (LIST_EMPTY(&bp->b_dep)) {
+ bp->b_flags &= ~B_IOSTARTED;
+ } else {
+ KASSERT((bp->b_flags & B_IOSTARTED) == 0,
+ ("bqrelse: SU io not finished bp %p", bp));
+ }
+
if (bp->b_flags & B_MANAGED) {
if (bp->b_flags & B_REMFREE)
bremfreef(bp);