summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/ufs/ufs/ufs_lookup.c6
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c10
-rw-r--r--sys/ufs/ufs/ufs_vnops.c14
3 files changed, 27 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index d65df288de1..623128442d6 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_lookup.c,v 1.11 1998/07/28 00:13:17 millert Exp $ */
+/* $OpenBSD: ufs_lookup.c,v 1.12 1999/02/26 03:35:18 art Exp $ */
/* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */
/*
@@ -765,7 +765,11 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
}
dp->i_ffs_size = dp->i_offset + DIRBLKSIZ;
dp->i_flag |= IN_CHANGE | IN_UPDATE;
+#if defined(UVM)
+ uvm_vnp_setsize(dvp, dp->i_ffs_size);
+#else
vnode_pager_setsize(dvp, (u_long)dp->i_ffs_size);
+#endif
dirp->d_reclen = DIRBLKSIZ;
blkoff = dp->i_offset &
(VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1);
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index 4d64776094b..7a9ce5a44eb 100644
--- a/sys/ufs/ufs/ufs_readwrite.c
+++ b/sys/ufs/ufs/ufs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_readwrite.c,v 1.14 1998/08/17 19:30:30 csapuntz Exp $ */
+/* $OpenBSD: ufs_readwrite.c,v 1.15 1999/02/26 03:35:18 art Exp $ */
/* $NetBSD: ufs_readwrite.c,v 1.9 1996/05/11 18:27:57 mycroft Exp $ */
/*-
@@ -252,9 +252,17 @@ WRITE(v)
break;
if (uio->uio_offset + xfersize > ip->i_ffs_size) {
ip->i_ffs_size = uio->uio_offset + xfersize;
+#if defined(UVM)
+ uvm_vnp_setsize(vp, ip->i_ffs_size);
+#else
vnode_pager_setsize(vp, (u_long)ip->i_ffs_size);
+#endif
}
+#if defined(UVM)
+ (void)uvm_vnp_uncache(vp);
+#else
(void)vnode_pager_uncache(vp);
+#endif
size = BLKSIZE(fs, ip, lbn) - bp->b_resid;
if (size < xfersize)
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 7f966a21b2b..99f3e197770 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_vnops.c,v 1.24 1999/02/25 07:30:50 millert Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.25 1999/02/26 03:35:18 art Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -59,6 +59,10 @@
#include <vm/vm.h>
+#if defined(UVM)
+#include <uvm/uvm_extern.h>
+#endif
+
#include <miscfs/specfs/specdev.h>
#include <miscfs/fifofs/fifo.h>
@@ -454,7 +458,11 @@ ufs_chmod(vp, mode, cred, p)
ip->i_ffs_mode |= (mode & ALLPERMS);
ip->i_flag |= IN_CHANGE;
if ((vp->v_flag & VTEXT) && (ip->i_ffs_mode & S_ISTXT) == 0)
+#if defined(UVM)
+ (void) uvm_vnp_uncache(vp);
+#else
(void) vnode_pager_uncache(vp);
+#endif
return (0);
}
@@ -1311,7 +1319,11 @@ ufs_mkdir(v)
goto bad;
ip->i_ffs_size = DIRBLKSIZ;
ip->i_flag |= IN_CHANGE | IN_UPDATE;
+#if defined(UVM)
+ uvm_vnp_setsize(tvp, ip->i_ffs_size);
+#else
vnode_pager_setsize(tvp, (u_long)ip->i_ffs_size);
+#endif
bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate);
if (DOINGSOFTDEP(tvp)) {
/*