All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, containers@lists.linux-foundation.org,
	xemul@parallels.com, serue@us.ibm.com, mingo@elte.hu,
	orenl@cs.columbia.edu, hch@infradead.org,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 26/30] cr: mount namespace
Date: Tue, 14 Apr 2009 11:48:10 -0700	[thread overview]
Message-ID: <1239734890.32604.102.camel@nimitz> (raw)
In-Reply-To: <20090410024004.GA27788@x200.localdomain>

On Fri, 2009-04-10 at 06:40 +0400, Alexey Dobriyan wrote:
> 
> +struct mnt_namespace *alloc_mnt_ns(void)
> +{
> +       struct mnt_namespace *mnt_ns;
> +
> +       mnt_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
> +       if (mnt_ns) {
> +               atomic_set(&mnt_ns->count, 1);
> +               mnt_ns->root = NULL;
> +               INIT_LIST_HEAD(&mnt_ns->list);
> +               init_waitqueue_head(&mnt_ns->poll);
> +               mnt_ns->event = 0;
> +       }
> +       return mnt_ns;
> +}
> +
>  /*
>   * Allocate a new namespace structure and populate it with contents
>   * copied from the namespace of the passed in task structure.
> @@ -1981,15 +1996,10 @@ static struct mnt_namespace *dup_mnt_ns(struct
> mnt_namespace *mnt_ns,
>         struct vfsmount *rootmnt = NULL, *pwdmnt = NULL;
>         struct vfsmount *p, *q;
> 
> -       new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);
> +       new_ns = alloc_mnt_ns();
>         if (!new_ns)
>                 return ERR_PTR(-ENOMEM);
> 
> -       atomic_set(&new_ns->count, 1);
> -       INIT_LIST_HEAD(&new_ns->list);
> -       init_waitqueue_head(&new_ns->poll);
> -       new_ns->event = 0;
> -
>         down_write(&namespace_sem);
>         /* First pass: copy the tree topology */
>         new_ns->root = copy_tree(mnt_ns->root, mnt_ns->root->mnt_root,
> --- a/include/linux/cr.h

This bit should be broken out, and stuck at the beginning of the series.

-- Dave


  reply	other threads:[~2009-04-14 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10  2:40 [PATCH 26/30] cr: mount namespace Alexey Dobriyan
2009-04-14 18:48 ` Dave Hansen [this message]
     [not found] ` <20090410024004.GA27788-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-04-14 18:48   ` Dave Hansen
2009-04-14 18:53   ` Dave Hansen
2009-04-14 18:53 ` Dave Hansen
  -- strict thread matches above, loose matches on Subject: below --
2009-04-10  2:40 Alexey Dobriyan

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=1239734890.32604.102.camel@nimitz \
    --to=dave@linux.vnet.ibm.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=orenl@cs.columbia.edu \
    --cc=serue@us.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=xemul@parallels.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.