aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-12-15 13:27:48 -0500
committerSage Weil <sage@newdream.net>2009-12-21 19:39:53 -0500
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 29a93fe35f85..d7cecc3366da 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,
1597 if (!req->r_reply) { 1597 if (!req->r_reply) {
1598 mutex_unlock(&mdsc->mutex); 1598 mutex_unlock(&mdsc->mutex);
1599 if (req->r_timeout) { 1599 if (req->r_timeout) {
1600 err = wait_for_completion_timeout(&req->r_completion, 1600 err = (long)wait_for_completion_interruptible_timeout(
1601 req->r_timeout); 1601 &req->r_completion, req->r_timeout);
1602 if (err > 0) 1602 if (err == 0)
1603 err = 0;
1604 else if (err == 0)
1605 req->r_reply = ERR_PTR(-EIO); 1603 req->r_reply = ERR_PTR(-EIO);
1604 else if (err < 0)
1605 req->r_reply = ERR_PTR(err);
1606 } else { 1606 } else {
1607 wait_for_completion(&req->r_completion); 1607 err = wait_for_completion_interruptible(
1608 &req->r_completion);
1609 if (err)
1610 req->r_reply = ERR_PTR(err);
1608 } 1611 }
1609 mutex_lock(&mdsc->mutex); 1612 mutex_lock(&mdsc->mutex);
1610 } 1613 }