diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 8e6e29eacb1a6b6b0188c40f510e2924dccbbdb7..14bf83ba45d3a7e4debd0283b51496c4eff3f76d 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -522,11 +522,11 @@ static int rbd_header_from_disk(struct rbd_image_header *header, snap_count = le32_to_cpu(ondisk->snap_count); - size = sizeof (ondisk->block_name) + 1; + size = sizeof (ondisk->object_prefix) + 1; header->object_prefix = kmalloc(size, GFP_KERNEL); if (!header->object_prefix) return -ENOMEM; - memcpy(header->object_prefix, ondisk->block_name, size - 1); + memcpy(header->object_prefix, ondisk->object_prefix, size - 1); header->object_prefix[size - 1] = '\0'; if (snap_count) { diff --git a/drivers/block/rbd_types.h b/drivers/block/rbd_types.h index 0924e9e41a60ce4b297f8fb62a17ca6d81c90cf1..d9d8a77748bca72209d6674c4e39fb10ae9a4415 100644 --- a/drivers/block/rbd_types.h +++ b/drivers/block/rbd_types.h @@ -47,7 +47,7 @@ struct rbd_image_snap_ondisk { struct rbd_image_header_ondisk { char text[40]; - char block_name[24]; + char object_prefix[24]; char signature[4]; char version[8]; struct {