btrfs-progs: Properly size the leafsize field in the mdrestore_struct struct
authorAdam Buchbinder <abuchbinder@google.com>
Thu, 12 Jun 2014 22:57:33 +0000 (15:57 -0700)
committerDavid Sterba <dsterba@suse.cz>
Fri, 22 Aug 2014 12:43:09 +0000 (14:43 +0200)
It's 32 bits as defined in ctree.h, but the struct had it as 64 bits.

Found using MemorySanitizer.

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
btrfs-image.c

index cf1fe2d..98d765a 100644 (file)
@@ -128,7 +128,7 @@ struct mdrestore_struct {
        struct rb_root chunk_tree;
        struct list_head list;
        size_t num_items;
-       u64 leafsize;
+       u32 leafsize;
        u64 devid;
        u8 uuid[BTRFS_UUID_SIZE];
        u8 fsid[BTRFS_FSID_SIZE];