From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org, steved@redhat.com,
trond.myklebust@fys.uio.no, aviro@redhat.com, hch@infradead.org
Cc: linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com,
nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] NFS: Make namespace initialisation out of line
Date: Wed, 08 Mar 2006 21:14:23 +0000 [thread overview]
Message-ID: <8734.1141852463@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060308203023.25493.6137.stgit@warthog.cambridge.redhat.com>
The attached patch makes the abstracted-out namespace initialisation out of
line.
Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 /tmp/initns.diff
fs/namespace.c | 20 ++++++++++++++++++++
include/linux/namespace.h | 16 +---------------
2 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 6f13481..3466a11 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1714,6 +1714,26 @@ out3:
goto out2;
}
+/*
+ * initialise a namespace, rooting it at the given specified mountpoint if one
+ * is given
+ */
+void init_namespace(struct namespace *namespace, struct vfsmount *mnt)
+{
+ atomic_set(&namespace->count, 1);
+ INIT_LIST_HEAD(&namespace->list);
+ init_waitqueue_head(&namespace->poll);
+ namespace->event = 0;
+ namespace->root = mnt;
+
+ if (mnt) {
+ list_add(&mnt->mnt_list, &namespace->list);
+ mnt->mnt_namespace = namespace;
+ }
+}
+
+EXPORT_SYMBOL_GPL(init_namespace);
+
static void __init init_mount_tree(void)
{
struct vfsmount *mnt;
diff --git a/include/linux/namespace.h b/include/linux/namespace.h
index ea6fd62..c371a30 100644
--- a/include/linux/namespace.h
+++ b/include/linux/namespace.h
@@ -16,21 +16,7 @@ struct namespace {
extern int copy_namespace(int, struct task_struct *);
extern void __put_namespace(struct namespace *namespace);
extern struct namespace *dup_namespace(struct task_struct *, struct fs_struct *);
-
-static inline void init_namespace(struct namespace *namespace,
- struct vfsmount *mnt)
-{
- atomic_set(&namespace->count, 1);
- INIT_LIST_HEAD(&namespace->list);
- init_waitqueue_head(&namespace->poll);
- namespace->event = 0;
- namespace->root = mnt;
-
- if (mnt) {
- list_add(&mnt->mnt_list, &namespace->list);
- mnt->mnt_namespace = namespace;
- }
-}
+extern void init_namespace(struct namespace *, struct vfsmount *);
static inline void put_namespace(struct namespace *namespace)
{
next prev parent reply other threads:[~2006-03-08 21:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-08 20:30 [PATCH 1/6] NFS: Permit filesystem to override root dentry on mount [try #7] David Howells
2006-03-08 20:30 ` [PATCH 2/6] 9p: Fix error handling on superblock alloc failure " David Howells
2006-03-08 21:28 ` Christoph Hellwig
2006-03-08 20:30 ` [PATCH 3/6] NFS: Abstract out namespace initialisation " David Howells
2006-03-08 20:32 ` Christoph Hellwig
2006-03-08 21:14 ` David Howells [this message]
2006-03-08 20:30 ` [PATCH 4/6] NFS: Add dentry materialisation op " David Howells
2006-03-08 21:31 ` Christoph Hellwig
2006-03-08 20:30 ` [PATCH 5/6] NFS: Unify NFS superblocks per-protocol per-server " David Howells
2006-03-08 21:23 ` Christoph Hellwig
2006-03-08 22:48 ` Trond Myklebust
2006-03-09 11:27 ` David Howells
2006-03-08 20:30 ` [PATCH 6/6] Optimise d_find_alias() " David Howells
2006-03-08 21:25 ` [PATCH 1/6] NFS: Permit filesystem to override root dentry on mount " Christoph Hellwig
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=8734.1141852463@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=aviro@redhat.com \
--cc=hch@infradead.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=steved@redhat.com \
--cc=torvalds@osdl.org \
--cc=trond.myklebust@fys.uio.no \
/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