Re: [PATCH] rbd: Fix ceph_snap_context size calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/2012 03:11 AM, Yan, Zheng wrote:
From: "Yan, Zheng"<zheng.z.yan@xxxxxxxxx>

ceph_snap_context->snaps is an u64 array


You are correct.  We'll get this in soon.  Thanks.

Reviewed-by: Alex Elder <elder@xxxxxxxxxxx>

Signed-off-by: Zheng Yan<zheng.z.yan@xxxxxxxxx>
---
  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 65665c9..8b9c173 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;

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux