jfs: simplify procfs code

Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls.  Switch to use
proc_create_seq where applicable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2018-04-11 16:51:18 +02:00
parent 247dbed8c9
commit 07a3b8ed48
6 changed files with 24 additions and 99 deletions

View File

@@ -3874,7 +3874,7 @@ s64 xtTruncate_pmap(tid_t tid, struct inode *ip, s64 committed_size)
}
#ifdef CONFIG_JFS_STATISTICS
static int jfs_xtstat_proc_show(struct seq_file *m, void *v)
int jfs_xtstat_proc_show(struct seq_file *m, void *v)
{
seq_printf(m,
"JFS Xtree statistics\n"
@@ -3887,16 +3887,4 @@ static int jfs_xtstat_proc_show(struct seq_file *m, void *v)
xtStat.split);
return 0;
}
static int jfs_xtstat_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, jfs_xtstat_proc_show, NULL);
}
const struct file_operations jfs_xtstat_proc_fops = {
.open = jfs_xtstat_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
#endif