aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-21 19:02:37 -0500
committerSage Weil <sage@newdream.net>2009-12-21 19:40:00 -0500
commit7067f797b8409f1e10ec95ac2c1e17a200173d13 (patch)
tree29bac1d0c8a2415b5a960432bf7125b833300977 /fs
parent30dc6381bbac213987be6fe0b0fb89868ff1f2c0 (diff)
ceph: fix incremental osdmap pg_temp decoding bug
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/osdmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index a9416308de6f..0dbd606e21c4 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -538,7 +538,6 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
538 struct ceph_osdmap *map, 538 struct ceph_osdmap *map,
539 struct ceph_messenger *msgr) 539 struct ceph_messenger *msgr)
540{ 540{
541 struct ceph_osdmap *newmap = map;
542 struct crush_map *newcrush = NULL; 541 struct crush_map *newcrush = NULL;
543 struct ceph_fsid fsid; 542 struct ceph_fsid fsid;
544 u32 epoch = 0; 543 u32 epoch = 0;
@@ -701,7 +700,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
701 } 700 }
702 pg->pgid = pgid; 701 pg->pgid = pgid;
703 pg->len = pglen; 702 pg->len = pglen;
704 for (j = 0; j < len; j++) 703 for (j = 0; j < pglen; j++)
705 pg->osds[j] = ceph_decode_32(p); 704 pg->osds[j] = ceph_decode_32(p);
706 err = __insert_pg_mapping(pg, &map->pg_temp); 705 err = __insert_pg_mapping(pg, &map->pg_temp);
707 if (err) 706 if (err)