From 99669d2e372803ba9b5cd55be7ae965f3dde697c Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 19 May 1998 20:50:41 +0000 Subject: Change to stop a silly panic. This should be understood better. Change a buffer swizzle trick to a bcopy. It would be nice if the efficient trick could be used in the future. --- sys/contrib/softupdates/ffs_softdep.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/contrib/softupdates') diff --git a/sys/contrib/softupdates/ffs_softdep.c b/sys/contrib/softupdates/ffs_softdep.c index ebda489..118689c 100644 --- a/sys/contrib/softupdates/ffs_softdep.c +++ b/sys/contrib/softupdates/ffs_softdep.c @@ -1,3 +1,4 @@ + /* * Copyright 1998 Marshall Kirk McKusick. All Rights Reserved. * @@ -52,7 +53,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)ffs_softdep.c 9.14 (McKusick) 1/15/98 + * @(#)ffs_softdep.c 9.14 (McKusick) 1/15/98 */ /* @@ -1599,12 +1600,8 @@ deallocate_dependencies(bp, inodedep) if (bp->b_lblkno >= 0 || bp->b_blkno != indirdep->ir_savebp->b_lblkno) panic("deallocate_dependencies: not indir"); - tmp = indirdep->ir_savebp->b_data; - indirdep->ir_savebp->b_data = bp->b_data; - bp->b_data = tmp; - tmpsize = indirdep->ir_savebp->b_bufsize; - indirdep->ir_savebp->b_bufsize = bp->b_bufsize; - bp->b_bufsize = tmpsize; + bcopy(bp->b_data, indirdep->ir_savebp->b_data, + bp->b_bcount); WORKLIST_REMOVE(wk); WORKLIST_INSERT(&indirdep->ir_savebp->b_dep, wk); continue; -- cgit v1.1