Index: usr.sbin/makefs/ffs.c =================================================================== --- usr.sbin/makefs/ffs.c +++ usr.sbin/makefs/ffs.c @@ -1002,7 +1002,6 @@ errno = bwrite(bp); if (errno != 0) goto bad_ffs_write_file; - brelse(bp); if (!isfile) p += chunk; } Index: usr.sbin/makefs/ffs/buf.c =================================================================== --- usr.sbin/makefs/ffs/buf.c +++ usr.sbin/makefs/ffs/buf.c @@ -141,6 +141,7 @@ if (debug & DEBUG_BUF_BWRITE) printf("bwrite: write %ld (offset %lld) returned %lld\n", bp->b_bcount, (long long)offset, (long long)rv); + brelse(bp); if (rv == bp->b_bcount) return (0); else if (rv == -1) /* write error */ Index: usr.sbin/makefs/msdos/msdosfs_vnops.c =================================================================== --- usr.sbin/makefs/msdos/msdosfs_vnops.c +++ usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -500,7 +500,6 @@ cpsize = MIN((nsize - offs), blsize - on); memcpy(bp->b_data + on, dat + offs, cpsize); bwrite(bp); - brelse(bp); offs += cpsize; }