proc: introduce proc_create_single{,_data}
Variants of proc_create{,_data} that directly take a seq_file show callback and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -26,8 +26,8 @@ int __init fscache_proc_init(void)
|
||||
goto error_dir;
|
||||
|
||||
#ifdef CONFIG_FSCACHE_STATS
|
||||
if (!proc_create("fs/fscache/stats", S_IFREG | 0444, NULL,
|
||||
&fscache_stats_fops))
|
||||
if (!proc_create_single("fs/fscache/stats", S_IFREG | 0444, NULL,
|
||||
fscache_stats_show))
|
||||
goto error_stats;
|
||||
#endif
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user