Thread: [Linux1394-cvslog] rev 850 - branches/linux-2.4
Brought to you by:
aeb,
bencollins
From: SVN U. <we...@li...> - 2003-04-03 13:16:46
|
Author: weihs Date: 2003-04-03 08:16:12 -0500 (Thu, 03 Apr 2003) New Revision: 850 Modified: branches/linux-2.4/highlevel.c Log: use write_lock_irqsave instead of write_lock_irq etc. where interrupts could be already diabled. Patch from Alexander Unrau Backport from trunk Modified: branches/linux-2.4/highlevel.c ============================================================================== --- branches/linux-2.4/highlevel.c (original) +++ branches/linux-2.4/highlevel.c 2003-04-03 08:16:14.000000000 -0500 @@ -98,6 +98,7 @@ struct hpsb_address_serve *as; struct list_head *entry; int retval = 0; + unsigned long flags; if (((start|end) & 3) || (start >= end) || (end > 0x1000000000000ULL)) { HPSB_ERR("%s called with invalid addresses", __FUNCTION__); @@ -116,7 +117,7 @@ as->start = start; as->end = end; - write_lock_irq(&addr_space_lock); + write_lock_irqsave(&addr_space_lock, flags); entry = addr_space.next; while (list_entry(entry, struct hpsb_address_serve, as_list)->end @@ -130,7 +131,7 @@ } entry = entry->next; } - write_unlock_irq(&addr_space_lock); + write_unlock_irqrestore(&addr_space_lock, flags); if (retval == 0) { kfree(as); @@ -144,8 +145,9 @@ int retval = 0; struct hpsb_address_serve *as; struct list_head *entry; + unsigned long flags; - write_lock_irq(&addr_space_lock); + write_lock_irqsave(&addr_space_lock, flags); entry = hl->addr_list.next; @@ -161,7 +163,7 @@ } } - write_unlock_irq(&addr_space_lock); + write_unlock_irqrestore(&addr_space_lock, flags); return retval; } |