lkml.org 
[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] fs: handle shrinker registration failure insget_userns
On Fri, Nov 24, 2017 at 12:04:23AM +0900, Tetsuo Handa wrote:
> Al Viro wrote:
> > On Thu, Nov 23, 2017 at 03:35:37PM +0100, Michal Hocko wrote:
> > > Hopefully less screwed version. But as I've said I am not really
> > > familiar with the code and do not feel competent to change it so please
> > > be very careful here. I've moved the shrinker registration to
> > > alloc_super which turned out to be simpler.
> >
> > I don't get it. Why the hell do we need all that PITA in the first place?
> > Just make sget_userns() end with
> > if (unlikely(regsiter_shrinker(&s->s_shrink) != 0)) {
> > deactivate_locked_super(s);
> > s = ERR_PTR(-ENOMEM);
> > }
> > return s;
> > and be done with that. All there is to it...
> >
>
> Doesn't deactivate_locked_super() call unregister_shrinker() ?

And? unregister_shrinker() will do list_del() on empty list_head
and kfree(NULL); where's the problem with that?

\
 
 \ /
  Last update: 2017-11-23 16:29    [W:0.065 / U:5.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site