Skip to content
Commit 8913f343 authored by Chao Yu's avatar Chao Yu Committed by Theodore Ts'o
Browse files

mbcache: fix to detect failure of register_shrinker



register_shrinker in mb_cache_create may fail due to no memory. This
patch fixes to do the check of return value of register_shrinker and
handle the error case, otherwise mb_cache_create may return with no
error, but losing the inner shrinker.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 14fbd4aa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment