diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-12-18 15:05:07 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-12-18 15:05:07 -0500 |
commit | 9ee332d99e4d5a97548943b81c54668450ce641b (patch) | |
tree | 2586e075110c92340cea1baf239b4e34a6133da6 /fs/super.c | |
parent | bb422a738f6566f7439cd347d54e321e4fe92a9f (diff) | |
download | op-kernel-dev-9ee332d99e4d5a97548943b81c54668450ce641b.zip op-kernel-dev-9ee332d99e4d5a97548943b81c54668450ce641b.tar.gz |
sget(): handle failures of register_shrinker()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -517,7 +517,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; } |