[PATCH] drivers: lustre: obdclass: simplify unregister_shrinker() usage

2017-12-23 Thread Aliaksei Karaliou
lu_global_fini() explicitly uses knowledge about shrinker's internals to make decision about calling of unregister_shrinker(). Now this check was integrated into unregister_shrinker(), so it is safe to call it against unregistered shrinker. Signed-off-by: Aliaksei Karaliou --- drivers/st

[PATCH v3 3/4] drivers: lustre: ldlm: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
ldlm_pools_init() does not check result of register_shrinker() which was tagged __must_check recently, reported by sparse. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) v3: Style fixes, as

[PATCH v3 2/4] drivers: lustre: ptlrpc: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
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 --- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) v3: Style fixes

[PATCH v3 4/4] drivers: lustre: obdclass: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
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 --- drivers

[PATCH v3 1/4] drivers: lustre: osc: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
osc_init() does not check result of register_shrinker() which was tagged __must_check recently, reported by sparse. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/osc/osc_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre

[PATCH v3 4/4] drivers: lustre: obdclass: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
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 --- drivers

[PATCH v3 3/4] drivers: lustre: ldlm: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
ldlm_pools_init() does not check result of register_shrinker() which was tagged __must_check recently, reported by sparse. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) v3: Style fixes, as

[PATCH v3 1/4] drivers: lustre: osc: check result of register_shrinker()

2017-12-06 Thread Aliaksei Karaliou
osc_init() does not check result of register_shrinker() which was tagged __must_check recently, reported by sparse. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/osc/osc_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre

Re: [PATCH v2 1/2] staging: lustre: check result of register_shrinker

2017-12-06 Thread Aliaksei Karaliou
On 12/06/2017 11:51 AM, Greg KH wrote: On Mon, Dec 04, 2017 at 10:21:56PM +0300, Aliaksei Karaliou wrote: Lustre code lacks checking the result of register_shrinker() in several places. register_shrinker() was tagged __must_check recently so that sparse has started reporting it. Signed-off-by

[PATCH v2 2/2] staging: lustre: do proper fallback in lu_global_init()

2017-12-04 Thread Aliaksei Karaliou
lu_global_init() does not clean internals on failure, and its cleanup procedure lu_global_fini() is also not called on any failure. Patch addresses this problem by adding appropriate error handling. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 22

[PATCH v2 1/2] staging: lustre: check result of register_shrinker

2017-12-04 Thread Aliaksei Karaliou
Lustre code lacks checking the result of register_shrinker() in several places. register_shrinker() was tagged __must_check recently so that sparse has started reporting it. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 12 +--- drivers

Re: [PATCH] staging: lustre: check result of register_shrinker

2017-12-04 Thread Aliaksei Karaliou
On 12/04/2017 11:40 AM, Dan Carpenter wrote: On Sun, Dec 03, 2017 at 07:59:07PM +0300, ak wrote: Thank you for your extensive comments. I've also thought about adding more protection into unregister_shrinker(), but not sure how to properly organize the patch set, because there will be three pat

[PATCH] staging: lustre: check result of register_shrinker

2017-12-02 Thread Aliaksei Karaliou
Lustre code lacks checking the result of register_shrinker() in several places. register_shrinker() was tagged __must_check recently so that sparse has started reporting it. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 7 +-- drivers/staging

[PATCH v2] staging: android: ion: Improve memory alloc style

2017-06-13 Thread Aliaksei Karaliou
Use variable name instead of structure name to get size of memory to allocate as proposed by checkpatch.pl Signed-off-by: Aliaksei Karaliou --- drivers/staging/android/ion/ion_system_heap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ion

RE: [PATCH] staging: android: ion: heap: Improve code style

2017-06-13 Thread Aliaksei Karaliou
Sorry for that and thank you for reply. Regarding scripts/get_maintainer.pl, it seems that trying to avoid disturbing too much people it turned out vice versa. And it was wrong idea to ignoring vger mailing list since I need this patch to be in public. Best regards, Aliaksei. Aliaksei Karaliou

[PATCH] staging: android: ion: heap: Improve code style

2017-06-13 Thread Aliaksei Karaliou
This patch implements changes proposed by checkpatch.pl: * Remove redundant lines. * Don't use structure name to get size of memory to allocate. Signed-off-by: Aliaksei Karaliou --- drivers/staging/android/ion/ion_system_heap.c | 8 +++- 1 file changed, 3 insertions(