summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorYan, Zheng <ukernel@gmail.com>2014-09-11 08:25:18 +0200
committerIlya Dryomov <idryomov@redhat.com>2014-10-14 19:03:24 +0200
commit656e4382948d4b2c81bdaf707f1400f53eff2625 (patch)
treeb27db1d91f9f4248db216783889216ca9abbfe3f /fs/ceph/mds_client.c
parentlibceph: Convert pr_warning to pr_warn (diff)
downloadlinux-656e4382948d4b2c81bdaf707f1400f53eff2625.tar.xz
linux-656e4382948d4b2c81bdaf707f1400f53eff2625.zip
ceph: protect kick_requests() with mdsc->mutex
Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/ceph/mds_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index f751fea416e5..267ba4496dc8 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2471,9 +2471,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:
@@ -2503,6 +2502,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;