]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: lmv: cleanup req in lmv_getattr_name()
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 16 Aug 2016 20:18:46 +0000 (16:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 13:57:35 +0000 (15:57 +0200)
In lmv_getattr_name() don't return a freed request in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826
Reviewed-on: http://review.whamcloud.com/9863
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lmv/lmv_obd.c

index 59299949c7f44463353b0128260c24bed1124ab7..f1b8ae987a092abd17e061f4c8402ddadbfe8590 100644 (file)
@@ -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);
                }