From: Nicholas Mc Guire Date: Tue, 10 Mar 2015 15:18:15 +0000 (-0400) Subject: ceph: match wait_for_completion_timeout return type X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57e95460f0b360c4d29c0320922b46b55dd2b79f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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: Nicholas Mc Guire Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 92a6b6018511..d486f2a5a88d 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -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", inode, req->r_tid, last_tid); if (req->r_timeout) { - ret = wait_for_completion_timeout( - &req->r_safe_completion, req->r_timeout); - if (ret > 0) + unsigned long time_left = wait_for_completion_timeout( + &req->r_safe_completion, + req->r_timeout); + if (time_left > 0) ret = 0; - else if (ret == 0) + else ret = -EIO; /* timed out */ } else { wait_for_completion(&req->r_safe_completion);