diff options
-rw-r--r-- | sys/kern/vfs_bio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8b3abc6..e3780e3 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1312,6 +1312,11 @@ brelse(struct buf *bp) vfs_vmio_release(bp); } + } else if ((bp->b_flags & (B_INVAL | B_RELBUF)) != 0) { + if (bp->b_bufsize != 0) + allocbuf(bp, 0); + if (bp->b_vp != NULL) + brelvp(bp); } if (BUF_REFCNT(bp) > 1) { |