diff options
author | dg <dg@FreeBSD.org> | 1995-03-03 22:13:16 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-03 22:13:16 +0000 |
commit | 9dc7842c2577b5a88d023b5f5f373da763756b95 (patch) | |
tree | 9a2e43799ccdccaddab12d214c25f69027d8d3e7 /sys/ufs/ffs/ffs_alloc.c | |
parent | 78929da63cab7ac0a2bcc42e1c8e402e501f9434 (diff) | |
download | FreeBSD-src-9dc7842c2577b5a88d023b5f5f373da763756b95.zip FreeBSD-src-9dc7842c2577b5a88d023b5f5f373da763756b95.tar.gz |
Fixes from John Dyson to work around vnode lock hang. Basically, remove
the VOP_BMAP calls, and add one to bdwrite.
Submitted by: John Dyson
Diffstat (limited to 'sys/ufs/ffs/ffs_alloc.c')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index dbffd8c..0723bf2 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_alloc.c 8.8 (Berkeley) 2/21/94 - * $Id: ffs_alloc.c,v 1.7 1995/02/14 06:14:28 phk Exp $ + * $Id: ffs_alloc.c,v 1.8 1995/02/27 17:43:57 se Exp $ */ #include <sys/param.h> @@ -198,6 +198,13 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp) brelse(bp); return (error); } + + if( bp->b_blkno == bp->b_lblkno) { + if( lbprev >= NDADDR) + panic("ffs_realloccg: lbprev out of range"); + bp->b_blkno = fsbtodb(fs, bprev); + } + #ifdef QUOTA error = chkdq(ip, (long)btodb(nsize - osize), cred, 0); if (error) { @@ -273,7 +280,6 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp) (u_long (*)())ffs_alloccg); if (bno > 0) { bp->b_blkno = fsbtodb(fs, bno); - /* (void) vnode_pager_uncache(ITOV(ip)); */ ffs_blkfree(ip, bprev, (long)osize); if (nsize < request) ffs_blkfree(ip, bno + numfrags(fs, nsize), |