aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_xtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/jfs_xtree.c')
-rw-r--r--fs/jfs/jfs_xtree.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/fs/jfs/jfs_xtree.c b/fs/jfs/jfs_xtree.c
index 5a61ebf2cbc..ae3acafb447 100644
--- a/fs/jfs/jfs_xtree.c
+++ b/fs/jfs/jfs_xtree.c
@@ -20,7 +20,9 @@
20 */ 20 */
21 21
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/module.h>
23#include <linux/quotaops.h> 24#include <linux/quotaops.h>
25#include <linux/seq_file.h>
24#include "jfs_incore.h" 26#include "jfs_incore.h"
25#include "jfs_filsys.h" 27#include "jfs_filsys.h"
26#include "jfs_metapage.h" 28#include "jfs_metapage.h"
@@ -4134,13 +4136,9 @@ s64 xtTruncate_pmap(tid_t tid, struct inode *ip, s64 committed_size)
4134} 4136}
4135 4137
4136#ifdef CONFIG_JFS_STATISTICS 4138#ifdef CONFIG_JFS_STATISTICS
4137int jfs_xtstat_read(char *buffer, char **start, off_t offset, int length, 4139static int jfs_xtstat_proc_show(struct seq_file *m, void *v)
4138 int *eof, void *data)
4139{ 4140{
4140 int len = 0; 4141 seq_printf(m,
4141 off_t begin;
4142
4143 len += sprintf(buffer,
4144 "JFS Xtree statistics\n" 4142 "JFS Xtree statistics\n"
4145 "====================\n" 4143 "====================\n"
4146 "searches = %d\n" 4144 "searches = %d\n"
@@ -4149,19 +4147,19 @@ int jfs_xtstat_read(char *buffer, char **start, off_t offset, int length,
4149 xtStat.search, 4147 xtStat.search,
4150 xtStat.fastSearch, 4148 xtStat.fastSearch,
4151 xtStat.split); 4149 xtStat.split);
4150 return 0;
4151}
4152 4152
4153 begin = offset; 4153static int jfs_xtstat_proc_open(struct inode *inode, struct file *file)
4154 *start = buffer + begin; 4154{
4155 len -= begin; 4155 return single_open(file, jfs_xtstat_proc_show, NULL);
4156
4157 if (len > length)
4158 len = length;
4159 else
4160 *eof = 1;
4161
4162 if (len < 0)
4163 len = 0;
4164
4165 return len;
4166} 4156}
4157
4158const struct file_operations jfs_xtstat_proc_fops = {
4159 .owner = THIS_MODULE,
4160 .open = jfs_xtstat_proc_open,
4161 .read = seq_read,
4162 .llseek = seq_lseek,
4163 .release = single_release,
4164};
4167#endif 4165#endif