diff options
author | Xiubo Li <xiubli@redhat.com> | 2020-07-17 09:25:13 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-08-03 11:05:26 +0200 |
commit | aaf5a476201bf93bdab75d6922340516ee63f7e2 (patch) | |
tree | dd6b14850a5c496e3a2d1b06c95b3383a304f0a2 /fs/ceph/mds_client.c | |
parent | 94f17c00d6687993101372f996cf6690ec9adf83 (diff) |
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>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 9a09d12569bd..ef8a1179171b 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -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; |