diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-10-31 09:10:47 +0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-11-23 11:01:05 -0800 |
commit | fc55d2c9448b34218ca58733a6f51fbede09575b (patch) | |
tree | 3aacd587707e00cd58ae7db659d73993ef7703ef /fs/ceph/mds_client.c | |
parent | eb1b8af33c2e42a9a57fc0a7588f4a7b255d2e79 (diff) |
ceph: wake up 'safe' waiters when unregistering request
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>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 8ef79266d064..d90861f45210 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -644,6 +644,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); } @@ -2186,7 +2188,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) { /* |