aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-15 10:27:48 -0800
committerSage Weil <sage@newdream.net>2009-12-21 16:39:53 -0800
commite2885f06ce31d82b556be021acfa2eba160f29cc (patch)
tree694941f659c67f4d4832f08bcb9f7add21a4926f /fs
parentcf3e5c409b5d66ec66207092a3f7e3e2c42c0f3f (diff)
ceph: make mds ops interruptible
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 29a93fe35f8..d7cecc3366d 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1597,14 +1597,17 @@ int ceph_mdsc_do_request(struct ceph_mds_client *mdsc,
if (!req->r_reply) {
mutex_unlock(&mdsc->mutex);
if (req->r_timeout) {
- err = wait_for_completion_timeout(&req->r_completion,
- req->r_timeout);
- if (err > 0)
- err = 0;
- else if (err == 0)
+ err = (long)wait_for_completion_interruptible_timeout(
+ &req->r_completion, req->r_timeout);
+ if (err == 0)
req->r_reply = ERR_PTR(-EIO);
+ else if (err < 0)
+ req->r_reply = ERR_PTR(err);
} 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);
}