Correct statement to actually be the intended assert statement.

e3f4cfc7 introduced a LWLockHeldByMe() call, without the corresponding
Assert() surrounding it.

Spotted by Coverity.

Backpatch: 9.1+, like the previous commit
pull/30/head
Andres Freund 10 years ago
parent c9ed438817
commit cb89644bb0
  1. 2
      src/backend/storage/buffer/bufmgr.c

@ -2943,7 +2943,7 @@ FlushOneBuffer(Buffer buffer)
bufHdr = GetBufferDescriptor(buffer - 1);
LWLockHeldByMe(bufHdr->content_lock);
Assert(LWLockHeldByMe(bufHdr->content_lock));
FlushBuffer(bufHdr, NULL);
}

Loading…
Cancel
Save