From: Ram Pai <linuxram@us.ibm.com>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>,
mike@waychison.com, Miklos Szeredi <miklos@szeredi.hu>,
bfields@fieldses.org, Andrew Morton <akpm@osdl.org>,
penberg@cs.helsinki.fi
Subject: [RFC-2 PATCH 6/8] shared subtree
Date: Sun, 17 Jul 2005 23:53:17 -0700 [thread overview]
Message-ID: <20050718070702.002044000@localhost> (raw)
In-Reply-To: 20050718065311.210001000@localhost
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: namespace.patch --]
[-- Type: text/x-patch; name=namespace.patch, Size: 976 bytes --]
Adds ability to clone a namespace that has shared/private/slave/unclone
subtrees in it.
RP
Signed by Ram Pai (linuxram@us.ibm.com)
fs/namespace.c | 9 +++++++++
1 files changed, 9 insertions(+)
Index: 2.6.12.work1/fs/namespace.c
===================================================================
--- 2.6.12.work1.orig/fs/namespace.c
+++ 2.6.12.work1/fs/namespace.c
@@ -1763,6 +1763,13 @@ int copy_namespace(int flags, struct tas
q = new_ns->root;
while (p) {
q->mnt_namespace = new_ns;
+
+ if (IS_MNT_SHARED(q))
+ pnode_add_member_mnt(q->mnt_pnode, q);
+ else if (IS_MNT_SLAVE(q))
+ pnode_add_slave_mnt(q->mnt_pnode, q);
+ put_pnode(q->mnt_pnode);
+
if (fs) {
if (p == fs->rootmnt) {
rootmnt = p;
@@ -2129,6 +2136,8 @@ void __put_namespace(struct namespace *n
spin_lock(&vfsmount_lock);
list_for_each_entry(mnt, &namespace->list, mnt_list) {
+ if (mnt->mnt_pnode)
+ pnode_disassociate_mnt(mnt);
mnt->mnt_namespace = NULL;
}
next prev parent reply other threads:[~2005-07-18 7:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 6:53 [RFC-2 PATCH 0/8] shared subtree Ram Pai
2005-07-18 6:53 ` [RFC-2 PATCH 1/8] " Ram Pai
2005-07-18 6:53 ` [RFC-2 PATCH 2/8] " Ram Pai
2005-07-18 6:53 ` [RFC-2 PATCH 3/8] " Ram Pai
2005-07-18 6:53 ` [RFC-2 PATCH 4/8] " Ram Pai
2005-07-18 6:53 ` [RFC-2 PATCH 5/8] " Ram Pai
2005-07-18 6:53 ` Ram Pai [this message]
2005-07-18 6:53 ` [RFC-2 PATCH 7/8] " Ram Pai
2005-07-18 6:53 ` [RFC-2 PATCH 8/8] " Ram Pai
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=20050718070702.002044000@localhost \
--to=linuxram@us.ibm.com \
--cc=akpm@osdl.org \
--cc=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike@waychison.com \
--cc=miklos@szeredi.hu \
--cc=penberg@cs.helsinki.fi \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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;
as well as URLs for NNTP newsgroup(s).