mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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>
This commit is contained in:
parent
eb1b8af33c
commit
fc55d2c944
1 changed files with 2 additions and 1 deletions
|
@ -644,6 +644,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc,
|
||||||
req->r_unsafe_dir = NULL;
|
req->r_unsafe_dir = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
complete_all(&req->r_safe_completion);
|
||||||
|
|
||||||
ceph_mdsc_put_request(req);
|
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) {
|
if (head->safe) {
|
||||||
req->r_got_safe = true;
|
req->r_got_safe = true;
|
||||||
__unregister_request(mdsc, req);
|
__unregister_request(mdsc, req);
|
||||||
complete_all(&req->r_safe_completion);
|
|
||||||
|
|
||||||
if (req->r_got_unsafe) {
|
if (req->r_got_unsafe) {
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue