提交 9ee332d9 编写于 作者: A Al Viro

sget(): handle failures of register_shrinker()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 bb422a73
......@@ -517,7 +517,11 @@ struct super_block *sget_userns(struct file_system_type *type,
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册