From 9464d00862ea6a5c0edc7118c86bdfa71a95190e Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Thu, 13 Mar 2014 16:36:16 +0200 Subject: [PATCH] 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 --- net/ceph/osdmap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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); -- 2.20.1