]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[SCSI] Revert "[SCSI] libfc: fix exchange being deleted when the abort itself is...
authorParikh, Neerav <neerav.parikh@intel.com>
Fri, 25 Feb 2011 23:02:56 +0000 (15:02 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 1 Mar 2011 00:31:13 +0000 (18:31 -0600)
When abort for an exchange timed out it didn't release the reference to
the exchange resulting in a memory leak.

After discussion with the author of the patch (CC) that introduced this
bug it was suggested to revert that patch.

This reverts commit ea3e2e72eeb3e8a9440a5da965914f9b12088626.

Signed-off by: Neerav Parikh <Neerav.Parikh@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_exch.c

index 08bf5fa6afd43afa22c7f58b42f7c390e12cfa5b..10a5436aff77a530d921c84c5747c6086a50da39 100644 (file)
@@ -666,13 +666,10 @@ static void fc_exch_timeout(struct work_struct *work)
                if (e_stat & ESB_ST_ABNORMAL)
                        rc = fc_exch_done_locked(ep);
                spin_unlock_bh(&ep->ex_lock);
+               if (!rc)
+                       fc_exch_delete(ep);
                if (resp)
                        resp(sp, ERR_PTR(-FC_EX_TIMEOUT), arg);
-               if (!rc) {
-                       /* delete the exchange if it's already being aborted */
-                       fc_exch_delete(ep);
-                       return;
-               }
                fc_seq_exch_abort(sp, 2 * ep->r_a_tov);
                goto done;
        }