mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 12:21:15 -04:00
drivers: lustre: ldlm: check result of register_shrinker()
ldlm_pools_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
8189c21d7e
commit
d85db086cf
@@ -1086,8 +1086,12 @@ int ldlm_pools_init(void)
|
||||
int rc;
|
||||
|
||||
rc = ldlm_pools_thread_start();
|
||||
if (rc == 0)
|
||||
register_shrinker(&ldlm_pools_cli_shrinker);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = register_shrinker(&ldlm_pools_cli_shrinker);
|
||||
if (rc)
|
||||
ldlm_pools_thread_stop();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user