From d373b8522c4efb8cb954579a8bb626c2a7b9ba7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Piotr=20Da=C5=82ek?= Date: Tue, 31 May 2016 21:42:00 +0200 Subject: [PATCH] buffer: don't invalidate crc cache of new ptr before zeroing it MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When doing append_zero, we create new bufferptr and then zero it. Don't invalidate internal crc cache, because at this point it's empty anyway. Signed-off-by: Piotr Dałek --- src/common/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 3557b3775d4f8..0438fd116e813 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -1754,7 +1754,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; void buffer::list::append_zero(unsigned len) { ptr bp(len); - bp.zero(); + bp.zero(false); append(std::move(bp)); } -- 2.39.5