Commit c32a512f authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Mike Snitzer

dm log userspace transfer: match wait_for_completion_timeout return type

Return type of wait_for_completion_timeout() is unsigned long not int.
An appropriately named unsigned long is added and the assignment fixed.
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 644bda6f
...@@ -172,6 +172,7 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type, ...@@ -172,6 +172,7 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
char *rdata, size_t *rdata_size) char *rdata, size_t *rdata_size)
{ {
int r = 0; int r = 0;
unsigned long tmo;
size_t dummy = 0; size_t dummy = 0;
int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg); int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg);
struct dm_ulog_request *tfr = prealloced_ulog_tfr; struct dm_ulog_request *tfr = prealloced_ulog_tfr;
...@@ -236,11 +237,11 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type, ...@@ -236,11 +237,11 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
goto out; goto out;
} }
r = wait_for_completion_timeout(&(pkg.complete), DM_ULOG_RETRY_TIMEOUT); tmo = wait_for_completion_timeout(&(pkg.complete), DM_ULOG_RETRY_TIMEOUT);
spin_lock(&receiving_list_lock); spin_lock(&receiving_list_lock);
list_del_init(&(pkg.list)); list_del_init(&(pkg.list));
spin_unlock(&receiving_list_lock); spin_unlock(&receiving_list_lock);
if (!r) { if (!tmo) {
DMWARN("[%s] Request timed out: [%u/%u] - retrying", DMWARN("[%s] Request timed out: [%u/%u] - retrying",
(strlen(uuid) > 8) ? (strlen(uuid) > 8) ?
(uuid + (strlen(uuid) - 8)) : (uuid), (uuid + (strlen(uuid) - 8)) : (uuid),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment