aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2014-08-08 17:21:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:23 -0400
commit8f053ac11f96cc6edcabcbb154c9cf06c5d63333 (patch)
tree66c802a173b5816c04ff5208e7616ffde4b840ba /fs/proc
parentd962c144839b231d7a787f9d2503f2d1171e2310 (diff)
proc: remove INF macro
If you're applying this patch, all /proc/$PID/* files were converted to seq_file interface and this code became unused. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c41
-rw-r--r--fs/proc/internal.h1
2 files changed, 0 insertions, 42 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index be41e8bed3ab..043c83cb51f9 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -130,10 +130,6 @@ struct pid_entry {
130 { .proc_get_link = get_link } ) 130 { .proc_get_link = get_link } )
131#define REG(NAME, MODE, fops) \ 131#define REG(NAME, MODE, fops) \
132 NOD(NAME, (S_IFREG|(MODE)), NULL, &fops, {}) 132 NOD(NAME, (S_IFREG|(MODE)), NULL, &fops, {})
133#define INF(NAME, MODE, read) \
134 NOD(NAME, (S_IFREG|(MODE)), \
135 NULL, &proc_info_file_operations, \
136 { .proc_read = read } )
137#define ONE(NAME, MODE, show) \ 133#define ONE(NAME, MODE, show) \
138 NOD(NAME, (S_IFREG|(MODE)), \ 134 NOD(NAME, (S_IFREG|(MODE)), \
139 NULL, &proc_single_file_operations, \ 135 NULL, &proc_single_file_operations, \
@@ -604,43 +600,6 @@ static const struct inode_operations proc_def_inode_operations = {
604 .setattr = proc_setattr, 600 .setattr = proc_setattr,
605}; 601};
606 602
607#define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output routines use some slack for overruns */
608
609static ssize_t proc_info_read(struct file * file, char __user * buf,
610 size_t count, loff_t *ppos)
611{
612 struct inode * inode = file_inode(file);
613 unsigned long page;
614 ssize_t length;
615 struct task_struct *task = get_proc_task(inode);
616
617 length = -ESRCH;
618 if (!task)
619 goto out_no_task;
620
621 if (count > PROC_BLOCK_SIZE)
622 count = PROC_BLOCK_SIZE;
623
624 length = -ENOMEM;
625 if (!(page = __get_free_page(GFP_TEMPORARY)))
626 goto out;
627
628 length = PROC_I(inode)->op.proc_read(task, (char*)page);
629
630 if (length >= 0)
631 length = simple_read_from_buffer(buf, count, ppos, (char *)page, length);
632 free_page(page);
633out:
634 put_task_struct(task);
635out_no_task:
636 return length;
637}
638
639static const struct file_operations proc_info_file_operations = {
640 .read = proc_info_read,
641 .llseek = generic_file_llseek,
642};
643
644static int proc_single_show(struct seq_file *m, void *v) 603static int proc_single_show(struct seq_file *m, void *v)
645{ 604{
646 struct inode *inode = m->private; 605 struct inode *inode = m->private;
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index a17accbd05ee..a024cf7b260f 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -52,7 +52,6 @@ struct proc_dir_entry {
52 52
53union proc_op { 53union proc_op {
54 int (*proc_get_link)(struct dentry *, struct path *); 54 int (*proc_get_link)(struct dentry *, struct path *);
55 int (*proc_read)(struct task_struct *task, char *page);
56 int (*proc_show)(struct seq_file *m, 55 int (*proc_show)(struct seq_file *m,
57 struct pid_namespace *ns, struct pid *pid, 56 struct pid_namespace *ns, struct pid *pid,
58 struct task_struct *task); 57 struct task_struct *task);