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:
@@ -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
|
||||
|
Reference in New Issue
Block a user