Commit 57e95460 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Ilya Dryomov

ceph: 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 up.
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent 3563dbdd
...@@ -1242,11 +1242,12 @@ static int ceph_dir_fsync(struct file *file, loff_t start, loff_t end, ...@@ -1242,11 +1242,12 @@ static int ceph_dir_fsync(struct file *file, loff_t start, loff_t end,
dout("dir_fsync %p wait on tid %llu (until %llu)\n", dout("dir_fsync %p wait on tid %llu (until %llu)\n",
inode, req->r_tid, last_tid); inode, req->r_tid, last_tid);
if (req->r_timeout) { if (req->r_timeout) {
ret = wait_for_completion_timeout( unsigned long time_left = wait_for_completion_timeout(
&req->r_safe_completion, req->r_timeout); &req->r_safe_completion,
if (ret > 0) req->r_timeout);
if (time_left > 0)
ret = 0; ret = 0;
else if (ret == 0) else
ret = -EIO; /* timed out */ ret = -EIO; /* timed out */
} else { } else {
wait_for_completion(&req->r_safe_completion); wait_for_completion(&req->r_safe_completion);
......
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