From: Ilya Dryomov Date: Thu, 13 Mar 2014 14:36:16 +0000 (+0200) Subject: libceph: nuke bogus encoding version check in osdmap_apply_incremental() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9464d00862ea6a5c0edc7118c86bdfa71a95190e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git libceph: nuke bogus encoding version check in osdmap_apply_incremental() 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 Reviewed-by: Alex Elder --- diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index b844a9273666..07fa3697ea12 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -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);