Skip to contentSkip to conversation

linux-next: build failure after merge of the vfs tree

PATCH Stephen Rothwell 2 participants 2 messages Dec 10, 2014 – Dec 11, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Al,

After merging the vfs tree, today's linux-next build (powerpc allnoconfig) failed like this:

fs/nsfs.c: In function 'ns_get_path':
fs/nsfs.c:83:2: error: implicit declaration of function 'current_kernel_time' [-Werror=implicit-function-declaration]
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
^
fs/nsfs.c:83:51: error: incompatible types when assigning to type 'struct timespec' from type 'int'

  inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
                                                   ^

Caused by commit 87fb64a6c1f7 ("take the targets of /proc/*/ns/* symlinks to separate fs").

I have applied the following patch for today.

From: Stephen Rothwell <[email protected]>
Date: Wed, 10 Dec 2014 18:37:32 +1100
Subject: [PATCH] nsfs: need include/ktime.h and timekeeping.h for CURRENT_TIME

---
 fs/nsfs.c | 2 ++
 1 file changed, 2 insertions(+)
fs/nsfs.c +2 -0
index 0791d086804d..7d98db03c2ce 100644
@@ -3,6 +3,8 @@
 #include <linux/fs.h>
 #include <linux/proc_ns.h>
 #include <linux/magic.h>
+#include <linux/ktime.h>
+#include <linux/timekeeping.h>
 
 static struct vfsmount *nsfs_mnt;
 
Signature · 5 lines
2.1.3

-- 
Cheers,
Stephen Rothwell                    [email protected]
maintainer
#1 lore raw
Quoted 10 lines · Stephen Rothwell

Hi Al,

After merging the vfs tree, today's linux-next build (powerpc allnoconfig) failed like this:

fs/nsfs.c +0 -0
index 0791d086804d..7d98db03c2ce 100644

fs/nsfs.c line 7

Quoted 5 lines
fs/nsfs.c +2 -0
@@ -3,6 +3,8 @@
 #include <linux/fs.h>
 #include <linux/proc_ns.h>
 #include <linux/magic.h>
+#include <linux/ktime.h>
+#include <linux/timekeeping.h>

Umm... Either it's time.h + timekeeping.h or ktime.h alone - ktime.h pulls timekeeping.h and time.h. For now I went with the latter variant. However, I wonder if longer term it would be better to provide a variant of new_inode_pseudo() that would set the timestamps that way - only two callers (new_inode() and sock_alloc()) do not do exactly that. Oh, well - that can wait...

For now, fixed and force-pushed