mirror of
https://gitee.com/openharmony/kernel_linux
synced 2025-05-21 06:06:34 +00:00
ceph: make mds ops interruptible
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
cf3e5c409b
commit
e2885f06ce
@ -1597,14 +1597,17 @@ int ceph_mdsc_do_request(struct ceph_mds_client *mdsc,
|
|||||||
if (!req->r_reply) {
|
if (!req->r_reply) {
|
||||||
mutex_unlock(&mdsc->mutex);
|
mutex_unlock(&mdsc->mutex);
|
||||||
if (req->r_timeout) {
|
if (req->r_timeout) {
|
||||||
err = wait_for_completion_timeout(&req->r_completion,
|
err = (long)wait_for_completion_interruptible_timeout(
|
||||||
req->r_timeout);
|
&req->r_completion, req->r_timeout);
|
||||||
if (err > 0)
|
if (err == 0)
|
||||||
err = 0;
|
|
||||||
else if (err == 0)
|
|
||||||
req->r_reply = ERR_PTR(-EIO);
|
req->r_reply = ERR_PTR(-EIO);
|
||||||
|
else if (err < 0)
|
||||||
|
req->r_reply = ERR_PTR(err);
|
||||||
} else {
|
} else {
|
||||||
wait_for_completion(&req->r_completion);
|
err = wait_for_completion_interruptible(
|
||||||
|
&req->r_completion);
|
||||||
|
if (err)
|
||||||
|
req->r_reply = ERR_PTR(err);
|
||||||
}
|
}
|
||||||
mutex_lock(&mdsc->mutex);
|
mutex_lock(&mdsc->mutex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user