diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2012-06-06 10:15:33 -0400 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-06-06 10:23:53 -0400 |
commit | f9f9a1904467816452fc70740165030e84c2c659 (patch) | |
tree | 96523c35dd3b4b8ae3c8f13553fb549580bcf09b /drivers/block/rbd.c | |
parent | a5988c490ef66cb04ea2f610681949b25c773b3c (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>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 65665c9c42c6..8b9c1734d807 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, | |||
499 | / sizeof (*ondisk)) | 499 | / sizeof (*ondisk)) |
500 | return -EINVAL; | 500 | return -EINVAL; |
501 | header->snapc = kmalloc(sizeof(struct ceph_snap_context) + | 501 | header->snapc = kmalloc(sizeof(struct ceph_snap_context) + |
502 | snap_count * sizeof (*ondisk), | 502 | snap_count * sizeof(u64), |
503 | gfp_flags); | 503 | gfp_flags); |
504 | if (!header->snapc) | 504 | if (!header->snapc) |
505 | return -ENOMEM; | 505 | return -ENOMEM; |