mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
ceph: remove unused variables in ceph_mdsmap_decode()
Fix build warnings: fs/ceph/mdsmap.c: In function ‘ceph_mdsmap_decode’: fs/ceph/mdsmap.c:192:7: warning: variable ‘info_cv’ set but not used [-Wunused-but-set-variable] fs/ceph/mdsmap.c:177:7: warning: variable ‘state_seq’ set but not used [-Wunused-but-set-variable] fs/ceph/mdsmap.c:123:15: warning: variable ‘mdsmap_cv’ set but not used [-Wunused-but-set-variable] Note that p is increased in ceph_decode_*. Signed-off-by: Jia Yang <jiayang5@huawei.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
f1f565a269
commit
8e298deb8d
@ -120,7 +120,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
|
||||
const void *start = *p;
|
||||
int i, j, n;
|
||||
int err;
|
||||
u8 mdsmap_v, mdsmap_cv;
|
||||
u8 mdsmap_v;
|
||||
u16 mdsmap_ev;
|
||||
|
||||
m = kzalloc(sizeof(*m), GFP_NOFS);
|
||||
@ -129,7 +129,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
|
||||
|
||||
ceph_decode_need(p, end, 1 + 1, bad);
|
||||
mdsmap_v = ceph_decode_8(p);
|
||||
mdsmap_cv = ceph_decode_8(p);
|
||||
*p += sizeof(u8); /* mdsmap_cv */
|
||||
if (mdsmap_v >= 4) {
|
||||
u32 mdsmap_len;
|
||||
ceph_decode_32_safe(p, end, mdsmap_len, bad);
|
||||
@ -174,7 +174,6 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
|
||||
u64 global_id;
|
||||
u32 namelen;
|
||||
s32 mds, inc, state;
|
||||
u64 state_seq;
|
||||
u8 info_v;
|
||||
void *info_end = NULL;
|
||||
struct ceph_entity_addr addr;
|
||||
@ -189,9 +188,8 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
|
||||
info_v= ceph_decode_8(p);
|
||||
if (info_v >= 4) {
|
||||
u32 info_len;
|
||||
u8 info_cv;
|
||||
ceph_decode_need(p, end, 1 + sizeof(u32), bad);
|
||||
info_cv = ceph_decode_8(p);
|
||||
*p += sizeof(u8); /* info_cv */
|
||||
info_len = ceph_decode_32(p);
|
||||
info_end = *p + info_len;
|
||||
if (info_end > end)
|
||||
@ -210,7 +208,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
|
||||
mds = ceph_decode_32(p);
|
||||
inc = ceph_decode_32(p);
|
||||
state = ceph_decode_32(p);
|
||||
state_seq = ceph_decode_64(p);
|
||||
*p += sizeof(u64); /* state_seq */
|
||||
err = ceph_decode_entity_addr(p, end, &addr);
|
||||
if (err)
|
||||
goto corrupt;
|
||||
|
Loading…
Reference in New Issue
Block a user