/*static char *SCCSID = "@(#)retbuf.c   6.1 90/11/17";*/
/*static char *SCCSID = "@(#)retbuf.c   13.2 90/01/25";*/
#include <os2.h>
#include "const.h"
#include "misc.h"
#include "chain.h"
#include "buf.h"
#include "dir.h"
#include "volume.h"
#include "storage.h"
#include "tables.h"
#include "pb_ifs.h"
#include "superb.h"
#include "lw.h"
#include "frame.h"
#include "fsdata.h"
#include "assert.h"
#include "pbmacros.h"
#include "log.h"                                                 // @76193
#include "pr_CACHE.h"
#include "pr_MISC.h"
#include "pr_debug.h"


/*
 ***    RetBuf - Return Scratch Buffer
 *
 *      Some folks call GFB just because they want a cache-block sized
 *      piece of free ram.  They call RetBuf to give it back.
 *
 *      ENTRY   pbuf = (ecx) buffer header, HELD
 *
 *      EXIT    None
 *
 *      HISTORY
 *  @76193  23-Nov-1993 by D.Azzarito - Change holds for LOG support
 *          15-Nov-1988 12:57:32 by Mark Hitch  [markh] up to 10/9 ASM code
 *
 *      RetBuf is far since it is only called by DelEA and GetBuf
 *      (EA functions which live in FS_SEG), but calls AddHash and
 *      PlaceBuf.
 */

VOID far
RetBuf (PBUFNODE pbuf)
{
    DecrHoldsBUF (pbuf);  // @76193
    pbuf->lsnSec = LSN_BOGUS;
    AddHash (pbuf);
    PlaceBuf (pbuf, BP_TOSS);
}
