linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Arnd Bergmann <arnd@arndb.de>, Steve French <smfrench@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Paulo Alcantara <palcantara@suse.de>,
	Aurelien Aptel <aaptel@suse.com>,
	Steve French <stfrench@microsoft.com>
Subject: linux-next: build failure after merge of the y2038 tree
Date: Mon, 17 Dec 2018 20:11:46 +1100	[thread overview]
Message-ID: <20181217201146.170ca9b4@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2820 bytes --]

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 <sfr@canb.auug.org.au>
Date: Mon, 17 Dec 2018 20:03:28 +1100
Subject: [PATCH] cifs: update for current_kernel_time64() removal

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 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 */
-- 
2.19.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2018-12-17  9:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  9:11 Stephen Rothwell [this message]
2018-12-17 12:49 ` linux-next: build failure after merge of the y2038 tree Arnd Bergmann
2018-12-17 22:25   ` Steve French
  -- strict thread matches above, loose matches on Subject: below --
2019-11-14  4:38 Stephen Rothwell
2019-11-14 12:10 ` Arnd Bergmann
2018-03-27  7:26 Stephen Rothwell
2018-03-16  2:25 Stephen Rothwell
2018-03-16  5:23 ` Deepa Dinamani
2018-03-16  8:14   ` Arnd Bergmann
2018-03-17 23:13     ` Deepa Dinamani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181217201146.170ca9b4@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=aaptel@suse.com \
    --cc=arnd@arndb.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=palcantara@suse.de \
    --cc=smfrench@gmail.com \
    --cc=stfrench@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).