From: Yan, Zheng Date: Thu, 31 Oct 2013 01:10:47 +0000 (+0800) Subject: ceph: wake up 'safe' waiters when unregistering request X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fc55d2c9448b34218ca58733a6f51fbede09575b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Sage Weil --- 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) { /*