mirror of https://gitee.com/openkylin/linux.git
ceph: protect kick_requests() with mdsc->mutex
Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
b9a678994b
commit
656e438294
|
@ -2471,9 +2471,8 @@ static void handle_session(struct ceph_mds_session *session,
|
||||||
if (session->s_state == CEPH_MDS_SESSION_RECONNECTING)
|
if (session->s_state == CEPH_MDS_SESSION_RECONNECTING)
|
||||||
pr_info("mds%d reconnect denied\n", session->s_mds);
|
pr_info("mds%d reconnect denied\n", session->s_mds);
|
||||||
remove_session_caps(session);
|
remove_session_caps(session);
|
||||||
wake = 1; /* for good measure */
|
wake = 2; /* for good measure */
|
||||||
wake_up_all(&mdsc->session_close_wq);
|
wake_up_all(&mdsc->session_close_wq);
|
||||||
kick_requests(mdsc, mds);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CEPH_SESSION_STALE:
|
case CEPH_SESSION_STALE:
|
||||||
|
@ -2503,6 +2502,8 @@ static void handle_session(struct ceph_mds_session *session,
|
||||||
if (wake) {
|
if (wake) {
|
||||||
mutex_lock(&mdsc->mutex);
|
mutex_lock(&mdsc->mutex);
|
||||||
__wake_requests(mdsc, &session->s_waiting);
|
__wake_requests(mdsc, &session->s_waiting);
|
||||||
|
if (wake == 2)
|
||||||
|
kick_requests(mdsc, mds);
|
||||||
mutex_unlock(&mdsc->mutex);
|
mutex_unlock(&mdsc->mutex);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue