From b8ede1f6ee4d1cf7dd15994664f7041e044cd019 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 8 Dec 2016 09:39:46 -0800 Subject: [PATCH] Fix ring block tail zeroing The ring block tail zeroing memset treated the value as the offset to zero from, not the number of bytes at the tail to zero. Signed-off-by: Zach Brown --- kmod/src/ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/ring.c b/kmod/src/ring.c index 3cda13b5..ca72d15b 100644 --- a/kmod/src/ring.c +++ b/kmod/src/ring.c @@ -57,7 +57,7 @@ struct ring_info { */ static void finish_block(struct scoutfs_ring_block *ring, unsigned int tail) { - memset((char *)ring + tail, 0, SCOUTFS_BLOCK_SIZE - tail); + memset((char *)ring + SCOUTFS_BLOCK_SIZE - tail, 0, tail); scoutfs_crc_block(&ring->hdr); }