diff options
Diffstat (limited to 'kernel/drivers/staging/lustre/lustre/fld/lproc_fld.c')
-rw-r--r-- | kernel/drivers/staging/lustre/lustre/fld/lproc_fld.c | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/kernel/drivers/staging/lustre/lustre/fld/lproc_fld.c b/kernel/drivers/staging/lustre/lustre/fld/lproc_fld.c index f53fdcfae..603f56e60 100644 --- a/kernel/drivers/staging/lustre/lustre/fld/lproc_fld.c +++ b/kernel/drivers/staging/lustre/lustre/fld/lproc_fld.c @@ -48,7 +48,6 @@ #include "../include/obd.h" #include "../include/obd_class.h" -#include "../include/dt_object.h" #include "../include/obd_support.h" #include "../include/lustre_req_layout.h" #include "../include/lustre_fld.h" @@ -56,7 +55,7 @@ #include "fld_internal.h" static int -fld_proc_targets_seq_show(struct seq_file *m, void *unused) +fld_debugfs_targets_seq_show(struct seq_file *m, void *unused) { struct lu_client_fld *fld = (struct lu_client_fld *)m->private; struct lu_fld_target *target; @@ -73,7 +72,7 @@ fld_proc_targets_seq_show(struct seq_file *m, void *unused) } static int -fld_proc_hash_seq_show(struct seq_file *m, void *unused) +fld_debugfs_hash_seq_show(struct seq_file *m, void *unused) { struct lu_client_fld *fld = (struct lu_client_fld *)m->private; @@ -87,9 +86,9 @@ fld_proc_hash_seq_show(struct seq_file *m, void *unused) } static ssize_t -fld_proc_hash_seq_write(struct file *file, - const char __user *buffer, - size_t count, loff_t *off) +fld_debugfs_hash_seq_write(struct file *file, + const char __user *buffer, + size_t count, loff_t *off) { struct lu_client_fld *fld; struct lu_fld_hash *hash = NULL; @@ -128,8 +127,8 @@ fld_proc_hash_seq_write(struct file *file, } static ssize_t -fld_proc_cache_flush_write(struct file *file, const char __user *buffer, - size_t count, loff_t *pos) +fld_debugfs_cache_flush_write(struct file *file, const char __user *buffer, + size_t count, loff_t *pos) { struct lu_client_fld *fld = file->private_data; @@ -142,31 +141,26 @@ fld_proc_cache_flush_write(struct file *file, const char __user *buffer, return count; } -static int fld_proc_cache_flush_open(struct inode *inode, struct file *file) -{ - file->private_data = PDE_DATA(inode); - return 0; -} - -static int fld_proc_cache_flush_release(struct inode *inode, struct file *file) +static int +fld_debugfs_cache_flush_release(struct inode *inode, struct file *file) { file->private_data = NULL; return 0; } -static struct file_operations fld_proc_cache_flush_fops = { +static struct file_operations fld_debugfs_cache_flush_fops = { .owner = THIS_MODULE, - .open = fld_proc_cache_flush_open, - .write = fld_proc_cache_flush_write, - .release = fld_proc_cache_flush_release, + .open = simple_open, + .write = fld_debugfs_cache_flush_write, + .release = fld_debugfs_cache_flush_release, }; -LPROC_SEQ_FOPS_RO(fld_proc_targets); -LPROC_SEQ_FOPS(fld_proc_hash); +LPROC_SEQ_FOPS_RO(fld_debugfs_targets); +LPROC_SEQ_FOPS(fld_debugfs_hash); -struct lprocfs_vars fld_client_proc_list[] = { - { "targets", &fld_proc_targets_fops }, - { "hash", &fld_proc_hash_fops }, - { "cache_flush", &fld_proc_cache_flush_fops }, +struct lprocfs_vars fld_client_debugfs_list[] = { + { "targets", &fld_debugfs_targets_fops }, + { "hash", &fld_debugfs_hash_fops }, + { "cache_flush", &fld_debugfs_cache_flush_fops }, { NULL } }; |