Commit 3057240a authored by Yan, Zheng's avatar Yan, Zheng Committed by Jiri Slaby

ceph: protect kick_requests() with mdsc->mutex

commit 656e4382 upstream.
Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: default avatarSage Weil <sage@redhat.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent fcd082c0
......@@ -2389,9 +2389,8 @@ static void handle_session(struct ceph_mds_session *session,
if (session->s_state == CEPH_MDS_SESSION_RECONNECTING)
pr_info("mds%d reconnect denied\n", session->s_mds);
remove_session_caps(session);
wake = 1; /* for good measure */
wake = 2; /* for good measure */
wake_up_all(&mdsc->session_close_wq);
kick_requests(mdsc, mds);
break;
case CEPH_SESSION_STALE:
......@@ -2417,6 +2416,8 @@ static void handle_session(struct ceph_mds_session *session,
if (wake) {
mutex_lock(&mdsc->mutex);
__wake_requests(mdsc, &session->s_waiting);
if (wake == 2)
kick_requests(mdsc, mds);
mutex_unlock(&mdsc->mutex);
}
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment