mirror of
https://github.com/hardkernel/linux.git
synced 2026-05-03 18:55:31 +09:00
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:
committed by
Greg Kroah-Hartman
parent
7c7da1af05
commit
3be21f345e
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user