ceph: check the sesion state and return false in case it is closed

If the session is already in closed state, we should skip it.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Xiubo Li 2020-07-17 09:25:13 -04:00 committed by Ilya Dryomov
parent 94f17c00d6
commit aaf5a47620
1 changed files with 1 additions and 0 deletions

View File

@ -4303,6 +4303,7 @@ bool check_session_state(struct ceph_mds_session *s)
}
if (s->s_state == CEPH_MDS_SESSION_NEW ||
s->s_state == CEPH_MDS_SESSION_RESTARTING ||
s->s_state == CEPH_MDS_SESSION_CLOSED ||
s->s_state == CEPH_MDS_SESSION_REJECTED)
/* this mds is failed or recovering, just wait */
return false;