staging: lustre: lmv: Ensure lmv_intent_lookup cleans up reqp
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Tue, 16 Aug 2016 20:18:43 +0000 (16:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 13:57:35 +0000 (15:57 +0200)
Ensure there aren't invalid pointers hanging around after
ptlrpc_req_finished is called.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4826
Reviewed-on: http://review.whamcloud.com/9841
Reviewed-by: John L. Hammond <john.hammond@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_intent.c

index a38d343b935970841588729259ac6b6d2f479dc3..d7e165f041a50ba3f7ded1f47a72d85423fa2b95 100644 (file)
@@ -464,6 +464,9 @@ static int lmv_intent_lookup(struct obd_export *exp,
                        return PTR_ERR(tgt);
 
                ptlrpc_req_finished(*reqp);
+               it->it_request = NULL;
+               *reqp = NULL;
+
                CDEBUG(D_INODE, "For migrating dir, try target dir "DFID"\n",
                       PFID(&lsm->lsm_md_oinfo[1].lmo_fid));