summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-10-31 09:10:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 12:24:19 -0800
commitd58dd25632be5ec0250630ccddfea7e9bd913ecb (patch)
treea5472c6920f24433852ef80b7c19de2d35f17cf8 /fs/ceph
parent2c460e835ceecda4b327aacb6423b54f9a89042f (diff)
downloadlinux-3.10-d58dd25632be5ec0250630ccddfea7e9bd913ecb.tar.gz
linux-3.10-d58dd25632be5ec0250630ccddfea7e9bd913ecb.tar.bz2
linux-3.10-d58dd25632be5ec0250630ccddfea7e9bd913ecb.zip
ceph: wake up 'safe' waiters when unregistering request
commit fc55d2c9448b34218ca58733a6f51fbede09575b upstream. We also need to wake up 'safe' waiters if error occurs or request aborted. Otherwise sync(2)/fsync(2) may hang forever. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Signed-off-by: Sage Weil <sage@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/mds_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 0af8e298d5b..1ce14c18c46 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -639,6 +639,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc,
req->r_unsafe_dir = NULL;
}
+ complete_all(&req->r_safe_completion);
+
ceph_mdsc_put_request(req);
}
@@ -2154,7 +2156,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
if (head->safe) {
req->r_got_safe = true;
__unregister_request(mdsc, req);
- complete_all(&req->r_safe_completion);
if (req->r_got_unsafe) {
/*