aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/mds_client.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 0d451a83bc83..824a9b2cde71 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1143,10 +1143,8 @@ static void send_cap_releases(struct ceph_mds_client *mdsc,
1143 struct ceph_msg *msg; 1143 struct ceph_msg *msg;
1144 1144
1145 dout("send_cap_releases mds%d\n", session->s_mds); 1145 dout("send_cap_releases mds%d\n", session->s_mds);
1146 while (1) { 1146 spin_lock(&session->s_cap_lock);
1147 spin_lock(&session->s_cap_lock); 1147 while (!list_empty(&session->s_cap_releases_done)) {
1148 if (list_empty(&session->s_cap_releases_done))
1149 break;
1150 msg = list_first_entry(&session->s_cap_releases_done, 1148 msg = list_first_entry(&session->s_cap_releases_done,
1151 struct ceph_msg, list_head); 1149 struct ceph_msg, list_head);
1152 list_del_init(&msg->list_head); 1150 list_del_init(&msg->list_head);
@@ -1154,6 +1152,7 @@ static void send_cap_releases(struct ceph_mds_client *mdsc,
1154 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len); 1152 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len);
1155 dout("send_cap_releases mds%d %p\n", session->s_mds, msg); 1153 dout("send_cap_releases mds%d %p\n", session->s_mds, msg);
1156 ceph_con_send(&session->s_con, msg); 1154 ceph_con_send(&session->s_con, msg);
1155 spin_lock(&session->s_cap_lock);
1157 } 1156 }
1158 spin_unlock(&session->s_cap_lock); 1157 spin_unlock(&session->s_cap_lock);
1159} 1158}