Re: next-20080808 fs/nfsctl.c build error

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: James Morris
Date: Friday, August 8, 2008 - 3:31 pm

On Fri, 8 Aug 2008, Eduardo Habkost wrote:


Something I noticed in the configs posted with build breakages is 
CONFIG_SMP=n, although I'm not sure how/if that's related.

In any case, it seems that linux/cred.h should include linux/sched.h to 
provide a full definition of 'struct task_struct', so that 'current' can 
be dereferenced (e.g. in current_cred()).

Does this patch work for you and look correct ?

---- 

diff --git a/fs/nfsctl.c b/fs/nfsctl.c
index cc4ef26..f6967b6 100644
--- a/fs/nfsctl.c
+++ b/fs/nfsctl.c
@@ -14,6 +14,7 @@
 #include <linux/namei.h>
 #include <linux/mount.h>
 #include <linux/syscalls.h>
+#include <linux/cred.h>
 #include <asm/uaccess.h>
 
 /*
diff --git a/include/linux/cred.h b/include/linux/cred.h
index b156ed4..431f1ab 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -14,9 +14,9 @@
 
 #include <linux/capability.h>
 #include <linux/key.h>
+#include <linux/sched.h>
 #include <asm/atomic.h>
 
-struct user_struct;
 struct cred;
 struct inode;
 

---

Signed-off-by: James Morris <jmorris@namei.org>



-- 
James Morris
<jmorris@namei.org>
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
linux-next: Tree for August 8, Stephen Rothwell, (Fri Aug 8, 12:16 am)
next-20080808 fs/nfsctl.c build error, Eduardo Habkost, (Fri Aug 8, 10:25 am)
Re: next-20080808 fs/nfsctl.c build error, Randy Dunlap, (Fri Aug 8, 10:38 am)
Re: next-20080808 fs/nfsctl.c build error, James Morris, (Fri Aug 8, 3:31 pm)
Re: next-20080808 fs/nfsctl.c build error, David Howells, (Fri Aug 8, 3:58 pm)
Re: next-20080808 fs/nfsctl.c build error, James Morris, (Fri Aug 8, 4:33 pm)