-bunhash(bp)
- register struct buf *bp;
-{
- register struct buf *ep;
- register int i, x, s;
-
- if (bp->b_dev == NODEV)
- return;
- s = spl6();
- i = BUFHASH(dbtofsb(bp->b_blkno));
- x = bp - buf;
- if (bufhash[i] == x) {
- bufhash[i] = bp->b_hlink;
- goto ret;
- }
- for (ep = &buf[bufhash[i]]; ep != &buf[-1];
- ep = &buf[ep->b_hlink])
- if (ep->b_hlink == x) {
- ep->b_hlink = bp->b_hlink;
- goto ret;
- }
- panic("bunhash");
-ret:
- splx(s);
-}
-