diff options
author | Sage Weil <sage@newdream.net> | 2009-12-22 00:02:37 (GMT) |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-22 00:40:00 (GMT) |
commit | 7067f797b8409f1e10ec95ac2c1e17a200173d13 (patch) | |
tree | 29bac1d0c8a2415b5a960432bf7125b833300977 /fs | |
parent | 30dc6381bbac213987be6fe0b0fb89868ff1f2c0 (diff) | |
download | linux-7067f797b8409f1e10ec95ac2c1e17a200173d13.tar.xz |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index a941630..0dbd606 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, 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; @@ -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) |