diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 00:45:41 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 00:45:41 +0000 |
commit | c040f14f33a5e712975b7e369b94e266037a08b7 (patch) | |
tree | 6e40c8846fb6869fb1e36eb7109966a8eada1e39 | |
parent | 70b56742cf82dfc14c2cddce7d760f0ef720291e (diff) |
Bunch of bug fixes from NetBSD.
-rw-r--r-- | sys/ufs/ufs/ufs_inode.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index 3865342fde0..6696e932e63 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_inode.c,v 1.11 2001/11/27 05:27:12 art Exp $ */ +/* $OpenBSD: ufs_inode.c,v 1.12 2001/11/28 00:45:40 art Exp $ */ /* $NetBSD: ufs_inode.c,v 1.7 1996/05/11 18:27:52 mycroft Exp $ */ /* @@ -270,7 +270,8 @@ ufs_balloc_range(vp, off, len, cred, flags) lockmgr(&vp->v_glock, LK_RELEASE, NULL, curproc); /* - * unbusy any pages we are holding. + * clear PG_RDONLY on any pages we are holding + * (since they now have backing store) and unbusy them. * if we got an error, free any pages we created past the old eob. */ @@ -281,6 +282,9 @@ out: PGO_FREE); } if (pgs1[0] != NULL) { + for (i = 0; i < npages1; i++) { + pgs1[i]->flags &= ~PG_RDONLY; + } uvm_page_unbusy(pgs1, npages1); /* @@ -290,9 +294,12 @@ out: (uobj->pgops->pgo_flush)(uobj, oldeof & ~(bsize - 1), MIN((oldeof + bsize) & ~(bsize - 1), neweof), - PGO_CLEANIT | ((flags & B_SYNC) ? PGO_SYNCIO : 0)); + PGO_CLEANIT | PGO_SYNCIO); } if (pgs2[0] != NULL) { + for (i = 0; i < npages2; i++) { + pgs2[i]->flags &= ~PG_RDONLY; + } uvm_page_unbusy(pgs2, npages2); } simple_unlock(&uobj->vmobjlock); |