git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[pandora-kernel.git]
/
lib
/
idr.c
diff --git
a/lib/idr.c
b/lib/idr.c
index
bbf211a
..
ed055b2
100644
(file)
--- a/
lib/idr.c
+++ b/
lib/idr.c
@@
-944,6
+944,7
@@
int ida_simple_get(struct ida *ida, unsigned int start, unsigned int end,
{
int ret, id;
unsigned int max;
{
int ret, id;
unsigned int max;
+ unsigned long flags;
BUG_ON((int)start < 0);
BUG_ON((int)end < 0);
BUG_ON((int)start < 0);
BUG_ON((int)end < 0);
@@
-959,7
+960,7
@@
again:
if (!ida_pre_get(ida, gfp_mask))
return -ENOMEM;
if (!ida_pre_get(ida, gfp_mask))
return -ENOMEM;
- spin_lock
(&simple_ida_lock
);
+ spin_lock
_irqsave(&simple_ida_lock, flags
);
ret = ida_get_new_above(ida, start, &id);
if (!ret) {
if (id > max) {
ret = ida_get_new_above(ida, start, &id);
if (!ret) {
if (id > max) {
@@
-969,7
+970,7
@@
again:
ret = id;
}
}
ret = id;
}
}
- spin_unlock
(&simple_ida_lock
);
+ spin_unlock
_irqrestore(&simple_ida_lock, flags
);
if (unlikely(ret == -EAGAIN))
goto again;
if (unlikely(ret == -EAGAIN))
goto again;
@@
-985,10
+986,12
@@
EXPORT_SYMBOL(ida_simple_get);
*/
void ida_simple_remove(struct ida *ida, unsigned int id)
{
*/
void ida_simple_remove(struct ida *ida, unsigned int id)
{
+ unsigned long flags;
+
BUG_ON((int)id < 0);
BUG_ON((int)id < 0);
- spin_lock
(&simple_ida_lock
);
+ spin_lock
_irqsave(&simple_ida_lock, flags
);
ida_remove(ida, id);
ida_remove(ida, id);
- spin_unlock
(&simple_ida_lock
);
+ spin_unlock
_irqrestore(&simple_ida_lock, flags
);
}
EXPORT_SYMBOL(ida_simple_remove);
}
EXPORT_SYMBOL(ida_simple_remove);