diff options
Diffstat (limited to 'net/ceph/osdmap.c')
-rw-r--r-- | net/ceph/osdmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 298d076eee89..ec06010657b3 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c | |||
@@ -687,9 +687,10 @@ static int osdmap_set_max_osd(struct ceph_osdmap *map, int max) | |||
687 | static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) | 687 | static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) |
688 | { | 688 | { |
689 | u16 version; | 689 | u16 version; |
690 | u32 len, max, i; | ||
691 | u32 epoch = 0; | 690 | u32 epoch = 0; |
692 | void *start = *p; | 691 | void *start = *p; |
692 | u32 max; | ||
693 | u32 len, i; | ||
693 | int err; | 694 | int err; |
694 | struct ceph_pg_pool_info *pi; | 695 | struct ceph_pg_pool_info *pi; |
695 | 696 | ||
@@ -736,7 +737,8 @@ static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) | |||
736 | 737 | ||
737 | ceph_decode_32_safe(p, end, map->flags, e_inval); | 738 | ceph_decode_32_safe(p, end, map->flags, e_inval); |
738 | 739 | ||
739 | max = ceph_decode_32(p); | 740 | /* max_osd */ |
741 | ceph_decode_32_safe(p, end, max, e_inval); | ||
740 | 742 | ||
741 | /* (re)alloc osd arrays */ | 743 | /* (re)alloc osd arrays */ |
742 | err = osdmap_set_max_osd(map, max); | 744 | err = osdmap_set_max_osd(map, max); |