mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 05:25:18 +00:00
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 <zab@versity.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user