diff options
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/osdmap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index c39ac624ccc3..d4a6b0df3627 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c | |||
@@ -802,16 +802,13 @@ static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) | |||
802 | 802 | ||
803 | /* crush */ | 803 | /* crush */ |
804 | ceph_decode_32_safe(p, end, len, e_inval); | 804 | ceph_decode_32_safe(p, end, len, e_inval); |
805 | dout("osdmap_decode crush len %d from off 0x%x\n", len, | 805 | map->crush = crush_decode(*p, min(*p + len, end)); |
806 | (int)(*p - start)); | ||
807 | ceph_decode_need(p, end, len, e_inval); | ||
808 | map->crush = crush_decode(*p, end); | ||
809 | *p += len; | ||
810 | if (IS_ERR(map->crush)) { | 806 | if (IS_ERR(map->crush)) { |
811 | err = PTR_ERR(map->crush); | 807 | err = PTR_ERR(map->crush); |
812 | map->crush = NULL; | 808 | map->crush = NULL; |
813 | goto bad; | 809 | goto bad; |
814 | } | 810 | } |
811 | *p += len; | ||
815 | 812 | ||
816 | /* ignore the rest */ | 813 | /* ignore the rest */ |
817 | *p = end; | 814 | *p = end; |