[PATCH] 2.5.53 : drivers/scsi/qlogicfc.c locking fixes

Paulo Andre' (fscked@netvisao.pt)
Sun, 29 Dec 2002 22:36:52 +0000


This is a small patch to fix the remaining deprecated
save_flags/cli/restore_flags construction in the qlogicfc.c scsi driver.

Please review.

Paulo Andre'

---

--- qlogicfc.c.orig 2002-12-29 22:07:37.000000000 +0000 +++ qlogicfc.c 2002-12-29 22:12:38.000000000 +0000 @@ -108,6 +108,8 @@ #define TRACE_BUF_LEN (32*1024) +static spinlock_t qlogicfc_lock = SPIN_LOCK_UNLOCKED; + struct { u_long next; struct { @@ -122,14 +124,13 @@ { \ unsigned long flags; \ \ - save_flags(flags); \ - cli(); \ + spin_lock_irqsave(&qlogicfc_lock, flags); \ trace.buf[trace.next].name = (w); \ trace.buf[trace.next].time = jiffies; \ trace.buf[trace.next].index = (i); \ trace.buf[trace.next].addr = (long) (a); \ trace.next = (trace.next + 1) & (TRACE_BUF_LEN - 1); \ - restore_flags(flags); \ + spin_unlock_irqrestore(&qlogicfc_lock, flags); \ } #else - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/