summaryrefslogtreecommitdiffstats
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.c5
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) {
OpenPOWER on IntegriCloud