drivers: lustre: ptlrpc: check result of register_shrinker()
sptlrpc_enc_pool_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:
Родитель
3be21f345e
Коммит
8189c21d7e
|
@ -396,6 +396,8 @@ static struct shrinker pools_shrinker = {
|
|||
|
||||
int sptlrpc_enc_pool_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/*
|
||||
* maximum capacity is 1/8 of total physical memory.
|
||||
* is the 1/8 a good number?
|
||||
|
@ -432,9 +434,11 @@ int sptlrpc_enc_pool_init(void)
|
|||
if (!page_pools.epp_pools)
|
||||
return -ENOMEM;
|
||||
|
||||
register_shrinker(&pools_shrinker);
|
||||
rc = register_shrinker(&pools_shrinker);
|
||||
if (rc)
|
||||
enc_pools_free();
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
void sptlrpc_enc_pool_fini(void)
|
||||
|
|
Загрузка…
Ссылка в новой задаче