From: Andres Freund Date: Mon, 14 Dec 2015 10:24:55 +0000 (+0100) Subject: Correct statement to actually be the intended assert statement. X-Git-Tag: REL9_2_15~43 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=ea3f30cf69f44ba7c37e0cccfb0aa74d82c98e54;p=postgresql.git 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 --- diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 81b9b297724..8dbe0f169f6 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -2412,7 +2412,7 @@ FlushOneBuffer(Buffer buffer) bufHdr = &BufferDescriptors[buffer - 1]; - LWLockHeldByMe(bufHdr->content_lock); + Assert(LWLockHeldByMe(bufHdr->content_lock)); FlushBuffer(bufHdr, NULL); }