diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-03-13 16:36:16 +0200 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-04 21:07:46 -0700 |
commit | 9464d00862ea6a5c0edc7118c86bdfa71a95190e (patch) | |
tree | 85225fbea983f745e108a5de981e858f6cf4ee86 /net | |
parent | 86f1742b94dd0b4a2eb9255205d1756ddea182f8 (diff) | |
download | op-kernel-dev-9464d00862ea6a5c0edc7118c86bdfa71a95190e.zip op-kernel-dev-9464d00862ea6a5c0edc7118c86bdfa71a95190e.tar.gz |
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 <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osdmap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index b844a92..07fa369 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); |