From: James Morris <jmorris@namei.org>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
David Howells <dhowells@redhat.com>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: next-20080808 fs/nfsctl.c build error
Date: Sat, 9 Aug 2008 08:31:06 +1000 (EST) [thread overview]
Message-ID: <alpine.LRH.1.10.0808090825060.29741@tundra.namei.org> (raw)
In-Reply-To: <20080808172527.GB4742@blackpad>
On Fri, 8 Aug 2008, Eduardo Habkost wrote:
>
> I got the following build error on next-20080808:
>
> fs/nfsctl.c: In function ?do_open?:
> fs/nfsctl.c:45: error: implicit declaration of function ?current_cred?
> fs/nfsctl.c:45: warning: passing argument 4 of ?dentry_open? makes pointer from integer without a cast
> make[1]: *** [fs/nfsctl.o] Error 1
> make: *** [fs/nfsctl.o] Error 2
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>
next prev parent reply other threads:[~2008-08-08 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 7:16 linux-next: Tree for August 8 Stephen Rothwell
2008-08-08 17:25 ` next-20080808 fs/nfsctl.c build error Eduardo Habkost
2008-08-08 17:38 ` Randy Dunlap
2008-08-08 22:31 ` James Morris [this message]
2008-08-08 22:58 ` David Howells
2008-08-08 23:33 ` James Morris
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=alpine.LRH.1.10.0808090825060.29741@tundra.namei.org \
--to=jmorris@namei.org \
--cc=dhowells@redhat.com \
--cc=ehabkost@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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
all inboxes | Powered by JetHome®