summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cachefiles/proc.c')
-rw-r--r--fs/cachefiles/proc.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/fs/cachefiles/proc.c b/fs/cachefiles/proc.c
index 125b90f6c796..0ce1aa56b67f 100644
--- a/fs/cachefiles/proc.c
+++ b/fs/cachefiles/proc.c
@@ -85,21 +85,6 @@ static const struct seq_operations cachefiles_histogram_ops = {
85}; 85};
86 86
87/* 87/*
88 * open "/proc/fs/cachefiles/XXX" which provide statistics summaries
89 */
90static int cachefiles_histogram_open(struct inode *inode, struct file *file)
91{
92 return seq_open(file, &cachefiles_histogram_ops);
93}
94
95static const struct file_operations cachefiles_histogram_fops = {
96 .open = cachefiles_histogram_open,
97 .read = seq_read,
98 .llseek = seq_lseek,
99 .release = seq_release,
100};
101
102/*
103 * initialise the /proc/fs/cachefiles/ directory 88 * initialise the /proc/fs/cachefiles/ directory
104 */ 89 */
105int __init cachefiles_proc_init(void) 90int __init cachefiles_proc_init(void)
@@ -109,8 +94,8 @@ int __init cachefiles_proc_init(void)
109 if (!proc_mkdir("fs/cachefiles", NULL)) 94 if (!proc_mkdir("fs/cachefiles", NULL))
110 goto error_dir; 95 goto error_dir;
111 96
112 if (!proc_create("fs/cachefiles/histogram", S_IFREG | 0444, NULL, 97 if (!proc_create_seq("fs/cachefiles/histogram", S_IFREG | 0444, NULL,
113 &cachefiles_histogram_fops)) 98 &cachefiles_histogram_ops))
114 goto error_histogram; 99 goto error_histogram;
115 100
116 _leave(" = 0"); 101 _leave(" = 0");