ceph: fix osdmap decoding when pools include (removed) snaps
authorSage Weil <sage@newdream.net>
Mon, 1 Mar 2010 22:50:05 +0000 (14:50 -0800)
committerSage Weil <sage@newdream.net>
Mon, 1 Mar 2010 23:28:00 +0000 (15:28 -0800)
Add missing pointer dereference (p is a void **).

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/osdmap.c

index 34b5696..b83f269 100644 (file)
@@ -529,8 +529,8 @@ struct ceph_osdmap *osdmap_decode(void **p, void *end)
                ceph_decode_copy(p, &pi->v, sizeof(pi->v));
                __insert_pg_pool(&map->pg_pools, 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;
        }
        ceph_decode_32_safe(p, end, map->pool_max, bad);