Orabug:
28506080
Update r->r_elapsed under the spinlock to avoid racing with the
completion code freeing the asm_request.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
if (r->r_error)
r->r_status |= ASM_ERROR;
r->r_status |= ASM_COMPLETED;
+ r->r_elapsed = ((jiffies - r->r_elapsed) * 1000000) / HZ;
spin_unlock_irqrestore(&afi->f_lock, flags);
}
}
- r->r_elapsed = ((jiffies - r->r_elapsed) * 1000000) / HZ;
-
wake_up(&afi->f_wait);
} /* asm_finish_io() */