diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-26 09:30:40 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 09:30:40 -0400 |
| commit | 1503af661947b7a4a09355cc2ae6aa0d43f16776 (patch) | |
| tree | 5bfcfadf2dd2d98c2ad251c96d7ee43a6903819a /fs/proc/proc_misc.c | |
| parent | a31863168660c6b6f6c7ffe05bb6a38e97803326 (diff) | |
| parent | 024e8ac04453b3525448c31ef39848cf675ba6db (diff) | |
Merge branch 'linus' into x86/header-guards
Conflicts:
include/asm-x86/gpio.h
include/asm-x86/ide.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/proc/proc_misc.c')
| -rw-r--r-- | fs/proc/proc_misc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index c652d469dc08..ded969862960 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
| @@ -232,7 +232,6 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
| 232 | #undef K | 232 | #undef K |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | extern const struct seq_operations fragmentation_op; | ||
| 236 | static int fragmentation_open(struct inode *inode, struct file *file) | 235 | static int fragmentation_open(struct inode *inode, struct file *file) |
| 237 | { | 236 | { |
| 238 | (void)inode; | 237 | (void)inode; |
| @@ -246,7 +245,6 @@ static const struct file_operations fragmentation_file_operations = { | |||
| 246 | .release = seq_release, | 245 | .release = seq_release, |
| 247 | }; | 246 | }; |
| 248 | 247 | ||
| 249 | extern const struct seq_operations pagetypeinfo_op; | ||
| 250 | static int pagetypeinfo_open(struct inode *inode, struct file *file) | 248 | static int pagetypeinfo_open(struct inode *inode, struct file *file) |
| 251 | { | 249 | { |
| 252 | return seq_open(file, &pagetypeinfo_op); | 250 | return seq_open(file, &pagetypeinfo_op); |
| @@ -259,7 +257,6 @@ static const struct file_operations pagetypeinfo_file_ops = { | |||
| 259 | .release = seq_release, | 257 | .release = seq_release, |
| 260 | }; | 258 | }; |
| 261 | 259 | ||
| 262 | extern const struct seq_operations zoneinfo_op; | ||
| 263 | static int zoneinfo_open(struct inode *inode, struct file *file) | 260 | static int zoneinfo_open(struct inode *inode, struct file *file) |
| 264 | { | 261 | { |
| 265 | return seq_open(file, &zoneinfo_op); | 262 | return seq_open(file, &zoneinfo_op); |
| @@ -356,7 +353,6 @@ static const struct file_operations proc_devinfo_operations = { | |||
| 356 | .release = seq_release, | 353 | .release = seq_release, |
| 357 | }; | 354 | }; |
| 358 | 355 | ||
| 359 | extern const struct seq_operations vmstat_op; | ||
| 360 | static int vmstat_open(struct inode *inode, struct file *file) | 356 | static int vmstat_open(struct inode *inode, struct file *file) |
| 361 | { | 357 | { |
| 362 | return seq_open(file, &vmstat_op); | 358 | return seq_open(file, &vmstat_op); |
| @@ -468,14 +464,25 @@ static const struct file_operations proc_slabstats_operations = { | |||
| 468 | #ifdef CONFIG_MMU | 464 | #ifdef CONFIG_MMU |
| 469 | static int vmalloc_open(struct inode *inode, struct file *file) | 465 | static int vmalloc_open(struct inode *inode, struct file *file) |
| 470 | { | 466 | { |
| 471 | return seq_open(file, &vmalloc_op); | 467 | unsigned int *ptr = NULL; |
| 468 | int ret; | ||
| 469 | |||
| 470 | if (NUMA_BUILD) | ||
| 471 | ptr = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL); | ||
| 472 | ret = seq_open(file, &vmalloc_op); | ||
| 473 | if (!ret) { | ||
| 474 | struct seq_file *m = file->private_data; | ||
| 475 | m->private = ptr; | ||
| 476 | } else | ||
| 477 | kfree(ptr); | ||
| 478 | return ret; | ||
| 472 | } | 479 | } |
| 473 | 480 | ||
| 474 | static const struct file_operations proc_vmalloc_operations = { | 481 | static const struct file_operations proc_vmalloc_operations = { |
| 475 | .open = vmalloc_open, | 482 | .open = vmalloc_open, |
| 476 | .read = seq_read, | 483 | .read = seq_read, |
| 477 | .llseek = seq_lseek, | 484 | .llseek = seq_lseek, |
| 478 | .release = seq_release, | 485 | .release = seq_release_private, |
| 479 | }; | 486 | }; |
| 480 | #endif | 487 | #endif |
| 481 | 488 | ||
