Skip to content

Commit

Permalink
ceph: fix incremental osdmap pg_temp decoding bug
Browse files Browse the repository at this point in the history
An incremental pg_temp wasn't being decoded properly (wrong bound on
for loop).

Also remove unused local variable, while we're at it.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Dec 22, 2009
1 parent 30dc638 commit 7067f79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ceph/osdmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
struct ceph_osdmap *map,
struct ceph_messenger *msgr)
{
struct ceph_osdmap *newmap = map;
struct crush_map *newcrush = NULL;
struct ceph_fsid fsid;
u32 epoch = 0;
Expand Down Expand Up @@ -701,7 +700,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
}
pg->pgid = pgid;
pg->len = pglen;
for (j = 0; j < len; j++)
for (j = 0; j < pglen; j++)
pg->osds[j] = ceph_decode_32(p);
err = __insert_pg_mapping(pg, &map->pg_temp);
if (err)
Expand Down

0 comments on commit 7067f79

Please sign in to comment.