From patchwork Mon Dec 17 09:11:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 10732971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54D116C5 for ; Mon, 17 Dec 2018 09:11:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4838729D7E for ; Mon, 17 Dec 2018 09:11:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4661529E14; Mon, 17 Dec 2018 09:11:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E5F529E67 for ; Mon, 17 Dec 2018 09:11:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726505AbeLQJLw (ORCPT ); Mon, 17 Dec 2018 04:11:52 -0500 Received: from ozlabs.org ([203.11.71.1]:58279 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726323AbeLQJLw (ORCPT ); Mon, 17 Dec 2018 04:11:52 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43JFlR6Jk1z9sN1; Mon, 17 Dec 2018 20:11:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1545037908; bh=Xjoc8JKR/wBT/vj+3XoU9gDjk+9UaLNGfNF25lTdsGY=; h=Date:From:To:Cc:Subject:From; b=XdMh4unw61LtO4ZFuRBHu75i1UV5AJQlFF7/kgIxMmQF15jzJSQcXDn6PQSBdvM5P fzIJjVHWTflR5aezjJAB4mqnn1VZY9kQAXiJCay0KJyjelKVcsPGhPKQFDAEf94k3C ROCq9uNcKkyWSOyfvvaZgJDglspCTSTh4i5h2RGfwY125cMpvzQr/UHQ12i/S9hlSu gYztgQrhGkwgXecz2iXIfEtWq4JKhvMrJeMjBXV3SPeZaDtWvB8lEqD8lTnxCYn0eu sSeIPrejXXqRUSQUappj8Z2MDYeTwyMibpkJMC/H8zhWWBfntRGv2rOrlmNRYNs0uh CfCiUaL6Ty9MA== Date: Mon, 17 Dec 2018 20:11:46 +1100 From: Stephen Rothwell To: Arnd Bergmann , Steve French , CIFS Cc: Linux Next Mailing List , Linux Kernel Mailing List , Paulo Alcantara , Aurelien Aptel , Steve French Subject: linux-next: build failure after merge of the y2038 tree Message-ID: <20181217201146.170ca9b4@canb.auug.org.au> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Arnd, After merging the y2038 tree, today's linux-next build (x86_64 allmodconfig) failed like this: fs/cifs/dfs_cache.c: In function 'cache_entry_expired': fs/cifs/dfs_cache.c:106:7: error: implicit declaration of function 'current_kernel_time64'; did you mean 'core_kernel_text'? [-Werror=implicit-function-declaration] ts = current_kernel_time64(); ^~~~~~~~~~~~~~~~~~~~~ core_kernel_text fs/cifs/dfs_cache.c:106:5: error: incompatible types when assigning to type 'struct timespec64' from type 'int' ts = current_kernel_time64(); ^ fs/cifs/dfs_cache.c: In function 'get_expire_time': fs/cifs/dfs_cache.c:342:24: error: incompatible type for argument 1 of 'timespec64_add' return timespec64_add(current_kernel_time64(), ts); ^~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/restart_block.h:10, from include/linux/thread_info.h:13, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/rcupdate.h:40, from fs/cifs/dfs_cache.c:8: include/linux/time64.h:66:66: note: expected 'struct timespec64' but argument is of type 'int' static inline struct timespec64 timespec64_add(struct timespec64 lhs, ~~~~~~~~~~~~~~~~~~^~~ fs/cifs/dfs_cache.c:343:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Caused by commit ccea641b6742 ("timekeeping: remove obsolete time accessors") interacting with commit 34a44fb160f9 ("cifs: Add DFS cache routines") from the cifs tree. I have applied the following merge fix patch (better versions welcome): From: Stephen Rothwell Date: Mon, 17 Dec 2018 20:03:28 +1100 Subject: [PATCH] cifs: update for current_kernel_time64() removal Signed-off-by: Stephen Rothwell Acked-by: Arnd Bergmann --- fs/cifs/dfs_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c index 70f9c9e2175c..d20cc94d7abd 100644 --- a/fs/cifs/dfs_cache.c +++ b/fs/cifs/dfs_cache.c @@ -103,7 +103,7 @@ static inline bool cache_entry_expired(const struct dfs_cache_entry *ce) { struct timespec64 ts; - ts = current_kernel_time64(); + ktime_get_coarse_real_ts64(&ts); return timespec64_compare(&ts, &ce->ce_etime) >= 0; } @@ -338,8 +338,10 @@ static inline struct timespec64 get_expire_time(int ttl) .tv_sec = ttl, .tv_nsec = 0, }; + struct timespec64 now; - return timespec64_add(current_kernel_time64(), ts); + ktime_get_coarse_real_ts64(&now); + return timespec64_add(now, ts); } /* Allocate a new DFS target */