libceph: nuke bogus encoding version check in osdmap_apply_incremental()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 13 Mar 2014 14:36:16 +0000 (16:36 +0200)
committerSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 04:07:46 +0000 (21:07 -0700)
Only version 6 of osdmap encoding is supported, anything other than
version 6 results in an error and halts the decoding process.  Checking
if version is >= 5 is therefore bogus.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
net/ceph/osdmap.c

index b844a92736669017a6dc53492119afed25fa5ab7..07fa3697ea12f259086180fe0ee124df35fd2439 100644 (file)
@@ -952,11 +952,10 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
                if (err < 0)
                        goto bad;
        }
-       if (version >= 5) {
-               err = __decode_pool_names(p, end, map);
-               if (err)
-                       goto bad;
-       }
+
+       err = __decode_pool_names(p, end, map);
+       if (err)
+               goto bad;
 
        /* old_pool */
        ceph_decode_32_safe(p, end, len, e_inval);