diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/mds_client.c | 15 |
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 | } |