change free() to blkfree() to allow for malloc()/free()
[unix-history] / usr / src / sys / ufs / ffs / ufs_inode.c
index e8de953..c97d867 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ufs_inode.c 7.2 (Berkeley) %G%
+ *     @(#)ufs_inode.c 7.3 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -483,7 +483,7 @@ itrunc(oip, length)
                            indirtrunc(ip, bn, lastiblock[level], level);
                        if (lastiblock[level] < 0) {
                                ip->i_ib[level] = 0;
                            indirtrunc(ip, bn, lastiblock[level], level);
                        if (lastiblock[level] < 0) {
                                ip->i_ib[level] = 0;
-                               free(ip, bn, (off_t)fs->fs_bsize);
+                               blkfree(ip, bn, (off_t)fs->fs_bsize);
                                blocksreleased += nblocks;
                        }
                }
                                blocksreleased += nblocks;
                        }
                }
@@ -502,7 +502,7 @@ itrunc(oip, length)
                        continue;
                ip->i_db[i] = 0;
                bsize = (off_t)blksize(fs, ip, i);
                        continue;
                ip->i_db[i] = 0;
                bsize = (off_t)blksize(fs, ip, i);
-               free(ip, bn, bsize);
+               blkfree(ip, bn, bsize);
                blocksreleased += btodb(bsize);
        }
        if (lastblock < 0)
                blocksreleased += btodb(bsize);
        }
        if (lastblock < 0)
@@ -532,7 +532,7 @@ itrunc(oip, length)
                         * required for the storage we're keeping.
                         */
                        bn += numfrags(fs, newspace);
                         * required for the storage we're keeping.
                         */
                        bn += numfrags(fs, newspace);
-                       free(ip, bn, oldspace - newspace);
+                       blkfree(ip, bn, oldspace - newspace);
                        blocksreleased += btodb(oldspace - newspace);
                }
        }
                        blocksreleased += btodb(oldspace - newspace);
                }
        }
@@ -624,7 +624,7 @@ indirtrunc(ip, bn, lastbn, level)
                if (level > SINGLE)
                        blocksreleased +=
                            indirtrunc(ip, nb, (daddr_t)-1, level - 1);
                if (level > SINGLE)
                        blocksreleased +=
                            indirtrunc(ip, nb, (daddr_t)-1, level - 1);
-               free(ip, nb, (off_t)fs->fs_bsize);
+               blkfree(ip, nb, (off_t)fs->fs_bsize);
                blocksreleased += nblocks;
        }
 
                blocksreleased += nblocks;
        }