From: John L. Hammond Date: Tue, 16 Aug 2016 20:18:46 +0000 (-0400) Subject: staging: lustre: lmv: cleanup req in lmv_getattr_name() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29a85e250e791762d749024002957ef28e3c4ad5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: lustre: lmv: cleanup req in lmv_getattr_name() In lmv_getattr_name() don't return a freed request in the error path. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826 Reviewed-on: http://review.whamcloud.com/9863 Reviewed-by: Nathaniel Clark Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 59299949c7f4..f1b8ae987a09 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1920,6 +1920,7 @@ lmv_getattr_name(struct obd_export *exp, struct md_op_data *op_data, tgt = lmv_find_target(lmv, &rid); if (IS_ERR(tgt)) { ptlrpc_req_finished(*request); + *request = NULL; return PTR_ERR(tgt); }