aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-06-26 03:25:48 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:24 -0400
commit662795deb854b31501e0ffb42b7f0cce802c134a (patch)
treed4849ad5ca7383ca9d0c9b6d46db83097d5dba85 /fs/proc/base.c
parent6e66b52bf587f0dd9a8e0a581b9570e5c1969e33 (diff)
[PATCH] proc: Move proc_maps_operations into task_mmu.c
All of the functions for proc_maps_operations are already defined in task_mmu.c so move the operations structure to keep the functionality together. Since task_nommu.c implements a dummy version of /proc/<pid>/maps give it a simplified version of proc_maps_operations that it can modify to best suit its needs. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 29539c2268a3..c8636841bbcf 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -539,67 +539,6 @@ out:
539 goto exit; 539 goto exit;
540} 540}
541 541
542extern struct seq_operations proc_pid_maps_op;
543static int maps_open(struct inode *inode, struct file *file)
544{
545 struct task_struct *task = proc_task(inode);
546 int ret = seq_open(file, &proc_pid_maps_op);
547 if (!ret) {
548 struct seq_file *m = file->private_data;
549 m->private = task;
550 }
551 return ret;
552}
553
554static struct file_operations proc_maps_operations = {
555 .open = maps_open,
556 .read = seq_read,
557 .llseek = seq_lseek,
558 .release = seq_release,
559};
560
561#ifdef CONFIG_NUMA
562extern struct seq_operations proc_pid_numa_maps_op;
563static int numa_maps_open(struct inode *inode, struct file *file)
564{
565 struct task_struct *task = proc_task(inode);
566 int ret = seq_open(file, &proc_pid_numa_maps_op);
567 if (!ret) {
568 struct seq_file *m = file->private_data;
569 m->private = task;
570 }
571 return ret;
572}
573
574static struct file_operations proc_numa_maps_operations = {
575 .open = numa_maps_open,
576 .read = seq_read,
577 .llseek = seq_lseek,
578 .release = seq_release,
579};
580#endif
581
582#ifdef CONFIG_MMU
583extern struct seq_operations proc_pid_smaps_op;
584static int smaps_open(struct inode *inode, struct file *file)
585{
586 struct task_struct *task = proc_task(inode);
587 int ret = seq_open(file, &proc_pid_smaps_op);
588 if (!ret) {
589 struct seq_file *m = file->private_data;
590 m->private = task;
591 }
592 return ret;
593}
594
595static struct file_operations proc_smaps_operations = {
596 .open = smaps_open,
597 .read = seq_read,
598 .llseek = seq_lseek,
599 .release = seq_release,
600};
601#endif
602
603extern struct seq_operations mounts_op; 542extern struct seq_operations mounts_op;
604struct proc_mounts { 543struct proc_mounts {
605 struct seq_file m; 544 struct seq_file m;