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 'slub/lockless' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
[pandora-kernel.git]
/
mm
/
swapfile.c
diff --git
a/mm/swapfile.c
b/mm/swapfile.c
index
ff8dc1a
..
1b8c339
100644
(file)
--- a/
mm/swapfile.c
+++ b/
mm/swapfile.c
@@
-1681,19
+1681,14
@@
out:
}
#ifdef CONFIG_PROC_FS
}
#ifdef CONFIG_PROC_FS
-struct proc_swaps {
- struct seq_file seq;
- int event;
-};
-
static unsigned swaps_poll(struct file *file, poll_table *wait)
{
static unsigned swaps_poll(struct file *file, poll_table *wait)
{
- struct
proc_swaps *s
= file->private_data;
+ struct
seq_file *seq
= file->private_data;
poll_wait(file, &proc_poll_wait, wait);
poll_wait(file, &proc_poll_wait, wait);
- if (s
->
event != atomic_read(&proc_poll_event)) {
- s
->
event = atomic_read(&proc_poll_event);
+ if (s
eq->poll_
event != atomic_read(&proc_poll_event)) {
+ s
eq->poll_
event = atomic_read(&proc_poll_event);
return POLLIN | POLLRDNORM | POLLERR | POLLPRI;
}
return POLLIN | POLLRDNORM | POLLERR | POLLPRI;
}
@@
-1783,24
+1778,16
@@
static const struct seq_operations swaps_op = {
static int swaps_open(struct inode *inode, struct file *file)
{
static int swaps_open(struct inode *inode, struct file *file)
{
- struct
proc_swaps *s
;
+ struct
seq_file *seq
;
int ret;
int ret;
- s = kmalloc(sizeof(struct proc_swaps), GFP_KERNEL);
- if (!s)
- return -ENOMEM;
-
- file->private_data = s;
-
ret = seq_open(file, &swaps_op);
ret = seq_open(file, &swaps_op);
- if (ret) {
- kfree(s);
+ if (ret)
return ret;
return ret;
- }
- s
->seq.private = s
;
- s
->
event = atomic_read(&proc_poll_event);
- return
ret
;
+ s
eq = file->private_data
;
+ s
eq->poll_
event = atomic_read(&proc_poll_event);
+ return
0
;
}
static const struct file_operations proc_swaps_operations = {
}
static const struct file_operations proc_swaps_operations = {