diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2012-06-06 09:15:33 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-07-17 21:30:19 -0700 |
commit | 236df3755d944c33120d77e84b5ff6f3917eb307 (patch) | |
tree | bb7aa4bb12f3948be7ec3797822dae9fe6dadc8f | |
parent | 5bdca4e0768d3e0f4efa43d9a2cc8210aeb91ab9 (diff) | |
download | linux-236df3755d944c33120d77e84b5ff6f3917eb307.tar.bz2 |
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)
-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, / 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; |