in ext2fs_balloc_range(), clear PG_RDONLY on pages which now have backing store.

This commit is contained in:
chs 2001-07-04 21:16:01 +00:00
parent 2a7b0d97d6
commit c31ab668df
1 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_balloc.c,v 1.9 2001/05/30 11:57:19 mrg Exp $ */
/* $NetBSD: ext2fs_balloc.c,v 1.10 2001/07/04 21:16:01 chs Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@ -456,7 +456,9 @@ ext2fs_balloc_range(vp, off, len, cred, flags)
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.
*/
errout:
@ -466,6 +468,9 @@ errout:
PGO_FREE);
}
if (pgs[0] != NULL) {
for (i = 0; i < npages; i++) {
pgs[i]->flags &= ~PG_RDONLY;
}
uvm_page_unbusy(pgs, npages);
}
simple_unlock(&uobj->vmobjlock);