From 216639dd5091de4f4d7ad19b0b8dde11fad18286 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Tue, 19 May 2015 12:03:33 +0300 Subject: libceph: a couple tweaks for wait loops - return -ETIMEDOUT instead of -EIO in case of timeout - wait_event_interruptible_timeout() returns time left until timeout and since it can be almost LONG_MAX we had better assign it to long Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- net/ceph/mon_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/ceph/mon_client.c') diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 0da3bdc116f7..9d6ff1215928 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -308,7 +308,7 @@ int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch, unsigned long timeout) { unsigned long started = jiffies; - int ret; + long ret; mutex_lock(&monc->mutex); while (monc->have_osdmap < epoch) { -- cgit v1.2.3