Skip to contentSkip to conversation

Author: Zhu Yanhai <[email protected]>

PATCH Zhu Yanhai 1 participant 1 message May 10, 2010 Btrfs file system

lore
Share & tools
lore

Zhu Yanhai

author
#0 lore raw

Make csum_tree_block_size complain about the right thing.

It dereferenced a wrong pointer before.

disk-io.c +1 -1
index addebe1..c1ed8c8 100644
@@ -86,7 +86,7 @@ int csum_tree_block_size(struct extent_buffer *buf, u16 csum_size,
 		if (memcmp_extent_buffer(buf, result, 0, csum_size)) {
 			printk("checksum verify failed on %llu wanted %X "
 			       "found %X\n", (unsigned long long)buf->start,
-			       *((int *)result), *((int *)buf));
+			       *((int *)result), *((char *)buf->data));
 			free(result);
 			return 1;
 		}