aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-12-18 15:05:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-12-18 15:05:07 -0500
commit9ee332d99e4d5a97548943b81c54668450ce641b (patch)
tree2586e075110c92340cea1baf239b4e34a6133da6
parentbb422a738f6566f7439cd347d54e321e4fe92a9f (diff)
sget(): handle failures of register_shrinker()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/super.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index 7ff1349609e4..06bd25d90ba5 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -517,7 +517,11 @@ retry:
517 hlist_add_head(&s->s_instances, &type->fs_supers); 517 hlist_add_head(&s->s_instances, &type->fs_supers);
518 spin_unlock(&sb_lock); 518 spin_unlock(&sb_lock);
519 get_filesystem(type); 519 get_filesystem(type);
520 register_shrinker(&s->s_shrink); 520 err = register_shrinker(&s->s_shrink);
521 if (err) {
522 deactivate_locked_super(s);
523 s = ERR_PTR(err);
524 }
521 return s; 525 return s;
522} 526}
523 527