drivers: lustre: obdclass: check result of register_shrinker()
authorAliaksei Karaliou <akaraliou.dev@gmail.com>
Thu, 7 Dec 2017 07:25:53 +0000 (10:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2017 11:37:50 +0000 (12:37 +0100)
commitab33cb5ad1e57fbeb2cd80397d8d754357079c8c
treecbb3993e6d53cc53a94e028c445c5a302781a8e2
parentd85db086cf0c9d8581765ec787ca38e4ee6f3171
drivers: lustre: obdclass: check result of register_shrinker()

lu_global_init() does not check result of register_shrinker()
which was tagged __must_check recently, reported by sparse.
Patch also fixes missed cleanup of resources allocated prior to
register_shrinker() invocation and not freed after any failure.

Signed-off-by: Aliaksei Karaliou <akaraliou.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lu_object.c