diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2020-04-29 02:25:49 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2020-04-29 02:25:49 +0000 |
commit | 0262ca9372ae130f98a239cba20121ff5081a77c (patch) | |
tree | dabd676ef99e57e1cf5df949b314f0a7dfabcfef | |
parent | 64184130a13ed7d877c9e627a2e46b060110d557 (diff) |
Ensure that if we are doing a delayed write with a NOCACHE buffer, we
clear the NOCACHE flag, since if we are doing a delayed write the buffer
must be cached or it is thrown away when the "write" is done.
fixes vnd on mfs regress tests.
ok kettenis@ deraadt@
-rw-r--r-- | sys/kern/vfs_bio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 0db80ef0d6a..68f99d7075e 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.199 2020/03/12 17:38:02 visa Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.200 2020/04/29 02:25:48 beck Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -807,6 +807,7 @@ bdwrite(struct buf *bp) /* The "write" is done, so mark and release the buffer. */ CLR(bp->b_flags, B_NEEDCOMMIT); + CLR(bp->b_flags, B_NOCACHE); /* Must cache delayed writes */ SET(bp->b_flags, B_DONE); brelse(bp); } |