mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
ceph: wake up 'safe' waiters when unregistering request
commit fc55d2c944 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2c460e835c
commit
d58dd25632
@@ -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) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user