Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309448
b: refs/heads/master
c: 50f7c4c
h: refs/heads/master
v: v3
  • Loading branch information
Xi Wang authored and Alex Elder committed May 14, 2012
1 parent 398bcbe commit afcc483
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: f8ad495a8a0277b88c59bf38319e5e944aaf5a4a
refs/heads/master: 50f7c4c967d0b5acd8e7ba6ab654dc4a7ac869ac
10 changes: 6 additions & 4 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,18 @@ static void rbd_coll_release(struct kref *kref)
*/
static int rbd_header_from_disk(struct rbd_image_header *header,
struct rbd_image_header_ondisk *ondisk,
int allocated_snaps,
u32 allocated_snaps,
gfp_t gfp_flags)
{
int i;
u32 snap_count;
u32 i, snap_count;

if (memcmp(ondisk, RBD_HEADER_TEXT, sizeof(RBD_HEADER_TEXT)))
return -ENXIO;

snap_count = le32_to_cpu(ondisk->snap_count);
if (snap_count > (UINT_MAX - sizeof(struct ceph_snap_context))
/ sizeof (*ondisk))
return -EINVAL;
header->snapc = kmalloc(sizeof(struct ceph_snap_context) +
snap_count * sizeof (*ondisk),
gfp_flags);
Expand Down Expand Up @@ -1591,7 +1593,7 @@ static int rbd_read_header(struct rbd_device *rbd_dev,
{
ssize_t rc;
struct rbd_image_header_ondisk *dh;
int snap_count = 0;
u32 snap_count = 0;
u64 ver;
size_t len;

Expand Down

0 comments on commit afcc483

Please sign in to comment.