Message ID | 1495557238-1077-4-git-send-email-idryomov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/23/2017 11:33 AM, Ilya Dryomov wrote: > It's set but not used: CEPH_FEATURE_MONNAMES feature bit isn't > advertised, which guarantees a v1 MonMap. > > Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Looks good. Reviewed-by: Alex Elder <elder@linaro.org> > --- > net/ceph/mon_client.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c > index 29a0ef351c5e..250f11f78609 100644 > --- a/net/ceph/mon_client.c > +++ b/net/ceph/mon_client.c > @@ -43,15 +43,13 @@ struct ceph_monmap *ceph_monmap_decode(void *p, void *end) > int i, err = -EINVAL; > struct ceph_fsid fsid; > u32 epoch, num_mon; > - u16 version; > u32 len; > > ceph_decode_32_safe(&p, end, len, bad); > ceph_decode_need(&p, end, len, bad); > > dout("monmap_decode %p %p len %d\n", p, end, (int)(end-p)); > - > - ceph_decode_16_safe(&p, end, version, bad); > + p += sizeof(u16); /* skip version */ > > ceph_decode_need(&p, end, sizeof(fsid) + 2*sizeof(u32), bad); > ceph_decode_copy(&p, &fsid, sizeof(fsid)); > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 29a0ef351c5e..250f11f78609 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -43,15 +43,13 @@ struct ceph_monmap *ceph_monmap_decode(void *p, void *end) int i, err = -EINVAL; struct ceph_fsid fsid; u32 epoch, num_mon; - u16 version; u32 len; ceph_decode_32_safe(&p, end, len, bad); ceph_decode_need(&p, end, len, bad); dout("monmap_decode %p %p len %d\n", p, end, (int)(end-p)); - - ceph_decode_16_safe(&p, end, version, bad); + p += sizeof(u16); /* skip version */ ceph_decode_need(&p, end, sizeof(fsid) + 2*sizeof(u32), bad); ceph_decode_copy(&p, &fsid, sizeof(fsid));
It's set but not used: CEPH_FEATURE_MONNAMES feature bit isn't advertised, which guarantees a v1 MonMap. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> --- net/ceph/mon_client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)