From: Keith Mannthey Date: Mon, 22 Jul 2013 16:06:47 +0000 (+0800) Subject: staging/lustre/osc: Check return code for lu_kmem_init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a55e0f44cf360a2f466b4599ec107fae4bafae64;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/osc: Check return code for lu_kmem_init lu_kmem_init can fail and returns has a return code. Check for this return code in lu_kmem_init. This issue was found during 2gb VM Racer testing Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3063 Lustre-change: http://review.whamcloud.com/6514 Signed-off-by: Keith Mannthey Reviewed-by: Mike Pershin Reviewed-by: Nathaniel Clark Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 0c0e07b6f18e..fea04ca8ba6a 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -3681,6 +3681,8 @@ int __init osc_init(void) CDEBUG(D_INFO, "Lustre OSC module (%p).\n", &osc_caches); rc = lu_kmem_init(osc_caches); + if (rc) + RETURN(rc); lprocfs_osc_init_vars(&lvars);