Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331637
b: refs/heads/master
c: 843a0d0
h: refs/heads/master
i:
  331635: c759b3c
v: v3
  • Loading branch information
Alex Elder committed Oct 1, 2012
1 parent 61ce2e5 commit ce46195
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7698f2f5e0d7b7a062213fa970b7c4e121adf38e
refs/heads/master: 843a0d0879935742bb7270c9dc8d94abb8b39cee
4 changes: 2 additions & 2 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/rbd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ce46195

Please sign in to comment.