Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3be21f34 authored by Aliaksei Karaliou's avatar Aliaksei Karaliou Committed by Greg Kroah-Hartman
Browse files

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: default avatarAliaksei Karaliou <akaraliou.dev@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7c7da1af
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {