Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ufs in ufs_balloc_range(), clear PG_RDONLY on pages ...



details:   https://anonhg.NetBSD.org/src/rev/b85404086e66
branches:  trunk
changeset: 512078:b85404086e66
user:      chs <chs%NetBSD.org@localhost>
date:      Wed Jul 04 21:08:48 2001 +0000

description:
in ufs_balloc_range(), clear PG_RDONLY on pages which now have backing store.
fixes PR 13353.

diffstat:

 sys/ufs/ufs/ufs_inode.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 51d4f0078da3 -r b85404086e66 sys/ufs/ufs/ufs_inode.c
--- a/sys/ufs/ufs/ufs_inode.c   Wed Jul 04 20:49:00 2001 +0000
+++ b/sys/ufs/ufs/ufs_inode.c   Wed Jul 04 21:08:48 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_inode.c,v 1.23 2001/04/18 03:48:23 enami Exp $     */
+/*     $NetBSD: ufs_inode.c,v 1.24 2001/07/04 21:08:48 chs Exp $       */
 
 /*
  * Copyright (c) 1991, 1993
@@ -270,7 +270,8 @@
        lockmgr(&vp->v_glock, LK_RELEASE, NULL);
 
        /*
-        * 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 @@
                    PGO_FREE);
        }
        if (pgs1[0] != NULL) {
+               for (i = 0; i < npages1; i++) {
+                       pgs1[i]->flags &= ~PG_RDONLY;
+               }
                uvm_page_unbusy(pgs1, npages1);
 
                /*
@@ -294,6 +298,9 @@
                            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);



Home | Main Index | Thread Index | Old Index