Strengthen the LockBuffer() assertion that verifies BufferIsValid() by
making it verify BufferIsPinned() instead. Do the same in nearby
related functions.
There is probably not much chance that anybody will try to lock a buffer
that is not already pinned, but we might as well make sure of that.
{
BufferDesc *buf;
- Assert(BufferIsValid(buffer));
+ Assert(BufferIsPinned(buffer));
if (BufferIsLocal(buffer))
return; /* local buffers need no lock */
{
BufferDesc *buf;
- Assert(BufferIsValid(buffer));
+ Assert(BufferIsPinned(buffer));
if (BufferIsLocal(buffer))
return true; /* act as though we got it */
BufferDesc *bufHdr;
char *new_status = NULL;
- Assert(BufferIsValid(buffer));
+ Assert(BufferIsPinned(buffer));
Assert(PinCountWaitBuf == NULL);
if (BufferIsLocal(buffer))