From: Xiubo Li <xiubli@xxxxxxxxxx> When decreasing the 'max_mds' in the cephfs cluster, when the extra MDS or MDSes are not removed yet, the mdsmap may only decreased the 'max_mds' but still having the that or those MDSes 'in' or in the export targets list. Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx> --- fs/ceph/mdsmap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c index 61d67cbcb367..30387733765d 100644 --- a/fs/ceph/mdsmap.c +++ b/fs/ceph/mdsmap.c @@ -263,10 +263,6 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2) goto nomem; for (j = 0; j < num_export_targets; j++) { target = ceph_decode_32(&pexport_targets); - if (target >= m->possible_max_rank) { - err = -EIO; - goto corrupt; - } info->export_targets[j] = target; } } else { -- 2.31.1