From patchwork Tue Mar 10 15:18:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 5978461 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E3F35BF440 for ; Tue, 10 Mar 2015 15:23:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3215D200E3 for ; Tue, 10 Mar 2015 15:23:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD41B20225 for ; Tue, 10 Mar 2015 15:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932113AbbCJPWy (ORCPT ); Tue, 10 Mar 2015 11:22:54 -0400 Received: from www.osadl.org ([62.245.132.105]:48000 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097AbbCJPWn (ORCPT ); Tue, 10 Mar 2015 11:22:43 -0400 Received: from debian.hofrr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t2AFMThV012739; Tue, 10 Mar 2015 16:22:29 +0100 From: Nicholas Mc Guire To: Yan Zheng Cc: Sage Weil , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] ceph: match wait_for_completion_timeout return type Date: Tue, 10 Mar 2015 11:18:15 -0400 Message-Id: <1426000695-348-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- This was only compile tested for x86_64_defconfig + CONFIG_CEPH_FS=m Patch is against 4.0-rc2 linux-next (localversion-next is -next-20150306) fs/ceph/dir.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 83e9976..4bee6b7 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1218,6 +1218,7 @@ static int ceph_dir_fsync(struct file *file, loff_t start, loff_t end, struct ceph_mds_request *req; u64 last_tid; int ret = 0; + unsigned long time_left; dout("dir_fsync %p\n", inode); ret = filemap_write_and_wait_range(inode->i_mapping, start, end); @@ -1240,11 +1241,11 @@ 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( + time_left = wait_for_completion_timeout( &req->r_safe_completion, req->r_timeout); - if (ret > 0) + if (time_left > 0) ret = 0; - else if (ret == 0) + else if (!time_left) ret = -EIO; /* timed out */ } else { wait_for_completion(&req->r_safe_completion);