Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/ufs/ufs_inode.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/ufs/ufs_inode.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.22.2.3 retrieving revision 1.22.2.4 diff -u -p -r1.22.2.3 -r1.22.2.4 --- src/sys/ufs/ufs/ufs_inode.c 2001/09/21 22:37:09 1.22.2.3 +++ src/sys/ufs/ufs/ufs_inode.c 2001/10/08 20:11:54 1.22.2.4 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_inode.c,v 1.22.2.3 2001/09/21 22:37:09 nathanw Exp $ */ +/* $NetBSD: ufs_inode.c,v 1.22.2.4 2001/10/08 20:11:54 nathanw Exp $ */ /* * Copyright (c) 1991, 1993 @@ -267,16 +267,13 @@ ufs_balloc_range(vp, off, len, cred, fla /* * 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. + * if we got an error, the pages covering the new block + * were already unbusied down in ffs_balloc() to make + * things work out for softdep. */ out: simple_lock(&uobj->vmobjlock); - if (error) { - (void) (uobj->pgops->pgo_put)(uobj, round_page(oldeob), 0, - PGO_FREE); - simple_lock(&uobj->vmobjlock); - } if (pgs1[0] != NULL) { for (i = 0; i < npages1; i++) { pgs1[i]->flags &= ~PG_RDONLY; @@ -295,7 +292,7 @@ out: simple_lock(&uobj->vmobjlock); } } - if (pgs2[0] != NULL) { + if (pgs2[0] != NULL && !error) { for (i = 0; i < npages2; i++) { pgs2[i]->flags &= ~PG_RDONLY; }