[Linux1394-cvslog] rev 849 - trunk
Brought to you by:
aeb,
bencollins
|
From: SVN U. <we...@li...> - 2003-04-03 13:16:05
|
Author: weihs
Date: 2003-04-03 08:15:32 -0500 (Thu, 03 Apr 2003)
New Revision: 849
Modified:
trunk/highlevel.c
Log:
use write_lock_irqsave instead of write_lock_irq etc. where interrupts could be already diabled.
Patch from Alexander Unrau
Modified: trunk/highlevel.c
==============================================================================
--- trunk/highlevel.c (original)
+++ trunk/highlevel.c 2003-04-03 08:15:34.000000000 -0500
@@ -99,6 +99,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__);
@@ -117,7 +118,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 <= start) {
@@ -129,7 +130,7 @@
}
entry = entry->next;
}
- write_unlock_irq(&addr_space_lock);
+ write_unlock_irqrestore(&addr_space_lock, flags);
if (retval == 0) {
kfree(as);
@@ -143,8 +144,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;
@@ -160,7 +162,7 @@
}
}
- write_unlock_irq(&addr_space_lock);
+ write_unlock_irqrestore(&addr_space_lock, flags);
return retval;
}
|