aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2012-06-06 09:15:33 -0500
committerSage Weil <sage@inktank.com>2012-07-17 21:30:19 -0700
commit236df3755d944c33120d77e84b5ff6f3917eb307 (patch)
treebb7aa4bb12f3948be7ec3797822dae9fe6dadc8f /drivers/block
parent5bdca4e0768d3e0f4efa43d9a2cc8210aeb91ab9 (diff)
rbd: Fix ceph_snap_context size calculation
ceph_snap_context->snaps is an u64 array Signed-off-by: Zheng Yan <zheng.z.yan@intel.com> Reviewed-by: Alex Elder <elder@inktank.com> (cherry picked from commit f9f9a1904467816452fc70740165030e84c2c659)
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 65665c9c42c..8b9c1734d80 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -499,7 +499,7 @@ static int rbd_header_from_disk(struct rbd_image_header *header,
/ sizeof (*ondisk))
return -EINVAL;
header->snapc = kmalloc(sizeof(struct ceph_snap_context) +
- snap_count * sizeof (*ondisk),
+ snap_count * sizeof(u64),
gfp_flags);
if (!header->snapc)
return -ENOMEM;