diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2015-05-19 12:03:33 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 11:49:29 +0300 |
commit | 216639dd5091de4f4d7ad19b0b8dde11fad18286 (patch) | |
tree | 1f62dde05052f03bbaf1021cfaaa30e99e2d7087 /net/ceph/mon_client.c | |
parent | a319bf56a617354e62cf5f774d2ca4e1a8a3bff3 (diff) | |
download | linux-216639dd5091de4f4d7ad19b0b8dde11fad18286.tar.xz |
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 <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'net/ceph/mon_client.c')
-rw-r--r-- | net/ceph/mon_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |