projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'x86/mce' and 'x86/urgent' into perf/mce
[cascardo/linux.git]
/
fs
/
sysfs
/
file.c
diff --git
a/fs/sysfs/file.c
b/fs/sysfs/file.c
index
561a9c0
..
f5ea468
100644
(file)
--- a/
fs/sysfs/file.c
+++ b/
fs/sysfs/file.c
@@
-268,7
+268,7
@@
static int sysfs_get_open_dirent(struct sysfs_dirent *sd,
struct sysfs_open_dirent *od, *new_od = NULL;
retry:
struct sysfs_open_dirent *od, *new_od = NULL;
retry:
- spin_lock(&sysfs_open_dirent_lock);
+ spin_lock
_irq
(&sysfs_open_dirent_lock);
if (!sd->s_attr.open && new_od) {
sd->s_attr.open = new_od;
if (!sd->s_attr.open && new_od) {
sd->s_attr.open = new_od;
@@
-281,7
+281,7
@@
static int sysfs_get_open_dirent(struct sysfs_dirent *sd,
list_add_tail(&buffer->list, &od->buffers);
}
list_add_tail(&buffer->list, &od->buffers);
}
- spin_unlock(&sysfs_open_dirent_lock);
+ spin_unlock
_irq
(&sysfs_open_dirent_lock);
if (od) {
kfree(new_od);
if (od) {
kfree(new_od);
@@
-315,8
+315,9
@@
static void sysfs_put_open_dirent(struct sysfs_dirent *sd,
struct sysfs_buffer *buffer)
{
struct sysfs_open_dirent *od = sd->s_attr.open;
struct sysfs_buffer *buffer)
{
struct sysfs_open_dirent *od = sd->s_attr.open;
+ unsigned long flags;
- spin_lock
(&sysfs_open_dirent_lock
);
+ spin_lock
_irqsave(&sysfs_open_dirent_lock, flags
);
list_del(&buffer->list);
if (atomic_dec_and_test(&od->refcnt))
list_del(&buffer->list);
if (atomic_dec_and_test(&od->refcnt))
@@
-324,7
+325,7
@@
static void sysfs_put_open_dirent(struct sysfs_dirent *sd,
else
od = NULL;
else
od = NULL;
- spin_unlock
(&sysfs_open_dirent_lock
);
+ spin_unlock
_irqrestore(&sysfs_open_dirent_lock, flags
);
kfree(od);
}
kfree(od);
}
@@
-456,8
+457,9
@@
static unsigned int sysfs_poll(struct file *filp, poll_table *wait)
void sysfs_notify_dirent(struct sysfs_dirent *sd)
{
struct sysfs_open_dirent *od;
void sysfs_notify_dirent(struct sysfs_dirent *sd)
{
struct sysfs_open_dirent *od;
+ unsigned long flags;
- spin_lock
(&sysfs_open_dirent_lock
);
+ spin_lock
_irqsave(&sysfs_open_dirent_lock, flags
);
od = sd->s_attr.open;
if (od) {
od = sd->s_attr.open;
if (od) {
@@
-465,7
+467,7
@@
void sysfs_notify_dirent(struct sysfs_dirent *sd)
wake_up_interruptible(&od->poll);
}
wake_up_interruptible(&od->poll);
}
- spin_unlock
(&sysfs_open_dirent_lock
);
+ spin_unlock
_irqrestore(&sysfs_open_dirent_lock, flags
);
}
EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
}
EXPORT_SYMBOL_GPL(sysfs_notify_dirent);