[SCSI] pm80xx: Spinlock fix
spin_lock_irqsave for the HBA lock is called in one function where flag is local to that function. Another function is called from the first function where lock has to be released using spin_unlock_irqrestore for calling task_done of libsas. In the second function also flag is declared and used. For calling task_done there is no need to enable the irq. So instead of using spin_lock_irqsave and spin_unlock_irqrestore, spin_lock and spin_unlock is used now. This also avoids passing the flags across all the functions where HBA lock is being used. Also removed redundant code. Reported-by: NJason Seba <jason.seba42@gmail.com> Signed-off-by: NOleg Nesterov <oleg@redhat.com> Signed-off-by: NSuresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Signed-off-by: NViswas G <viswas.g@pmcs.com> Acked-by: NJack Wang <xjtuwjp@gmail.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
Showing
想要评论请 注册 或 登录