]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/block/aoe/aoecmd.c
aoe: manipulate aoedev network stats under lock
[~shefty/rdma-dev.git] / drivers / block / aoe / aoecmd.c
index 6ea27fd8954df833b781c1fe639a3683b7e38c74..9aefbe3957ca6d8e9ed899c3918aa6db044de234 100644 (file)
@@ -603,14 +603,14 @@ rexmit_timer(ulong vp)
 
        d = (struct aoedev *) vp;
 
+       spin_lock_irqsave(&d->lock, flags);
+
        /* timeout based on observed timings and variations */
        timeout = 2 * d->rttavg >> RTTSCALE;
        timeout += 8 * d->rttdev >> RTTDSCALE;
        if (timeout == 0)
                timeout = 1;
 
-       spin_lock_irqsave(&d->lock, flags);
-
        if (d->flags & DEVFL_TKILL) {
                spin_unlock_irqrestore(&d->lock, flags);
                return;