aboutsummaryrefslogtreecommitdiffstats
path: root/sys/ufs/ufs/ufs_readwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ufs/ufs/ufs_readwrite.c')
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index 9d95dac03921..5c77bd1c07d6 100644
--- a/sys/ufs/ufs/ufs_readwrite.c
+++ b/sys/ufs/ufs/ufs_readwrite.c
@@ -532,6 +532,8 @@ WRITE(ap)
bp->b_flags |= B_DIRECT;
if (ioflag & IO_NOWDRAIN)
bp->b_flags |= B_NOWDRAIN;
+ if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
+ bp->b_flags |= B_NOCACHE;
if (uio->uio_offset + xfersize > ip->i_size) {
ip->i_size = uio->uio_offset + xfersize;