drivers: lustre: osc: check result of register_shrinker()

osc_init() does not check result of register_shrinker()
which was tagged __must_check recently, reported by sparse.

Signed-off-by: Aliaksei Karaliou <akaraliou.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Aliaksei Karaliou
2017-12-07 10:25:50 +03:00
committed by Greg Kroah-Hartman
parent 7c7da1af05
commit 3be21f345e

View File

@@ -2844,7 +2844,9 @@ static int __init osc_init(void)
if (rc)
goto out_kmem;
register_shrinker(&osc_cache_shrinker);
rc = register_shrinker(&osc_cache_shrinker);
if (rc)
goto out_type;
/* This is obviously too much memory, only prevent overflow here */
if (osc_reqpool_mem_max >= 1 << 12 || osc_reqpool_mem_max == 0) {