Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9f9a190 authored by Yan, Zheng's avatar Yan, Zheng Committed by Alex Elder
Browse files

rbd: Fix ceph_snap_context size calculation



ceph_snap_context->snaps is an u64 array

Signed-off-by: default avatarZheng Yan <zheng.z.yan@intel.com>
Reviewed-by: default avatarAlex Elder <elder@inktank.com>
parent a5988c49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;