Browse Source

ceph: fix osdmap decoding when pools include (removed) snaps

Add missing pointer dereference (p is a void **).

Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil 15 years ago
parent
commit
e53a8fd773
1 changed files with 2 additions and 2 deletions
  1. 2 2
      fs/ceph/osdmap.c

+ 2 - 2
fs/ceph/osdmap.c

@@ -529,8 +529,8 @@ struct ceph_osdmap *osdmap_decode(void **p, void *end)
 		ceph_decode_copy(p, &pi->v, sizeof(pi->v));
 		ceph_decode_copy(p, &pi->v, sizeof(pi->v));
 		__insert_pg_pool(&map->pg_pools, pi);
 		__insert_pg_pool(&map->pg_pools, pi);
 		calc_pg_masks(pi);
 		calc_pg_masks(pi);
-		p += le32_to_cpu(pi->v.num_snaps) * sizeof(u64);
-		p += le32_to_cpu(pi->v.num_removed_snap_intervals)
+		*p += le32_to_cpu(pi->v.num_snaps) * sizeof(u64);
+		*p += le32_to_cpu(pi->v.num_removed_snap_intervals)
 			* sizeof(u64) * 2;
 			* sizeof(u64) * 2;
 	}
 	}
 	ceph_decode_32_safe(p, end, map->pool_max, bad);
 	ceph_decode_32_safe(p, end, map->pool_max, bad);