public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat•com>
To: James Morris <jmorris@namei•org>
Cc: dhowells@redhat•com, Eduardo Habkost <ehabkost@redhat•com>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>
Subject: Re: next-20080808 fs/nfsctl.c build error
Date: Fri, 08 Aug 2008 23:58:26 +0100	[thread overview]
Message-ID: <30847.1218236306@redhat.com> (raw)
In-Reply-To: <alpine.LRH.1.10.0808090825060.29741@tundra.namei.org>

James Morris <jmorris@namei•org> wrote:

> 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()).

Not good.  That makes sched.h and cred.h recursively dependent.  sched.h
really needs splitting up, and the include dependencies need sorting.

However, for the moment I recommend the attached patch.

David
---
From: David Howells <dhowells@redhat•com>

CRED: Fix inclusion problems

Under certain configurations, some .c files obtain linux/sched.h and/or
linux/cred.h through other include files, but not under all configurations.

A couple of places (one in Coda, one in nfsd) need extra includes.

Signed-off-by: David Howells <dhowells@redhat•com>
---

 fs/coda/file.c |    1 +
 fs/nfsctl.c    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/fs/coda/file.c b/fs/coda/file.c
index 5a87699..9d0d703 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/smp_lock.h>
 #include <linux/string.h>
+#include <linux/cred.h>
 #include <asm/uaccess.h>
 
 #include <linux/coda.h>
diff --git a/fs/nfsctl.c b/fs/nfsctl.c
index cc4ef26..358e469 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/sched.h>
 #include <asm/uaccess.h>
 
 /*

  reply	other threads:[~2008-08-08 22:58 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
2008-08-08 22:58     ` David Howells [this message]
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=30847.1218236306@redhat.com \
    --to=dhowells@redhat$(echo .)com \
    --cc=ehabkost@redhat$(echo .)com \
    --cc=jmorris@namei$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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