lkml.org 
[lkml]   [2018]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 019/115] sget(): handle failures of register_shrinker()
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Al Viro <viro@zeniv.linux.org.uk>


    [ Upstream commit 9ee332d99e4d5a97548943b81c54668450ce641b ]

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    fs/super.c | 6 +++++-
    1 file changed, 5 insertions(+), 1 deletion(-)

    --- a/fs/super.c
    +++ b/fs/super.c
    @@ -522,7 +522,11 @@ retry:
    hlist_add_head(&s->s_instances, &type->fs_supers);
    spin_unlock(&sb_lock);
    get_filesystem(type);
    - register_shrinker(&s->s_shrink);
    + err = register_shrinker(&s->s_shrink);
    + if (err) {
    + deactivate_locked_super(s);
    + s = ERR_PTR(err);
    + }
    return s;
    }


    \
     
     \ /
      Last update: 2018-03-02 11:02    [W:2.440 / U:1.152 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site