On Wed, Oct 10, 2012 at 07:54:04PM +0200, Oleg Nesterov wrote:
> On 10/10, Cyrill Gorcunov wrote:
> >
> >  static inline void put_pid_ns(struct pid_namespace *ns)
> >  {
> > -   if (ns != &init_pid_ns)
> > -           kref_put(&ns->kref, free_pid_ns);
> > +   struct pid_namespace *parent;
> > +
> > +   while (ns != &init_pid_ns) {
> > +           parent = ns->parent;
> > +           if (!kref_put(&ns->kref, free_pid_ns))
> > +                   break;
> > +           ns = parent;
> > +   }
> >  }
> 
> Looks better, thanks...
> 
> But Cyrill... since you updated the patch....
> 
> This looks a bit too much for "inline".  And if you put it into
> pid_namespace.c you can unexport free_pid_ns() and make it static.
> 
> But I agree with this version too ;)

It's hard to resist ;) I'll update.
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to