summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 13:00:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 13:00:01 -0400
commitcf626b0da78df6669c6b5f51ddd9a70a0702e579 (patch)
tree45d29a4cb7574aed7f140814ed22088ded21c291 /fs/cachefiles/proc.c
parent9c50eafc32ddbd166c8a2bbaecd4ad201c452b14 (diff)
parent5ef03dbd91855544cd4c7c1910c3ef5226ee87e8 (diff)
Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull procfs updates from Al Viro: "Christoph's proc_create_... cleanups series" * 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (44 commits) xfs, proc: hide unused xfs procfs helpers isdn/gigaset: add back gigaset_procinfo assignment proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields tty: replace ->proc_fops with ->proc_show ide: replace ->proc_fops with ->proc_show ide: remove ide_driver_proc_write isdn: replace ->proc_fops with ->proc_show atm: switch to proc_create_seq_private atm: simplify procfs code bluetooth: switch to proc_create_seq_data netfilter/x_tables: switch to proc_create_seq_private netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data neigh: switch to proc_create_seq_data hostap: switch to proc_create_{seq,single}_data bonding: switch to proc_create_seq_data rtc/proc: switch to proc_create_single_data drbd: switch to proc_create_single resource: switch to proc_create_seq_data staging/rtl8192u: simplify procfs code jfs: simplify procfs code ...
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");