Whamcloud - gitweb
LU-13783 build: Fix LB_LINUX_VERSION rule for v5.8
[fs/lustre-release.git] / lustre / fld / lproc_fld.c
index 1bcecdf..8c86abd 100644 (file)
@@ -82,7 +82,8 @@ static ssize_t
 fld_debugfs_hash_seq_write(struct file *file, const char __user *buffer,
                        size_t count, loff_t *off)
 {
-       struct lu_client_fld *fld;
+       struct seq_file *m = file->private_data;
+       struct lu_client_fld *fld = m->private;
        struct lu_fld_hash *hash = NULL;
        char fh_name[8];
        int i;
@@ -93,8 +94,6 @@ fld_debugfs_hash_seq_write(struct file *file, const char __user *buffer,
        if (copy_from_user(fh_name, buffer, count) != 0)
                return -EFAULT;
 
-       fld = ((struct seq_file *)file->private_data)->private;
-
        for (i = 0; fld_hash[i].fh_name; i++) {
                if (count != strlen(fld_hash[i].fh_name))
                        continue;
@@ -136,7 +135,7 @@ LDEBUGFS_SEQ_FOPS_RO(fld_debugfs_targets);
 LDEBUGFS_SEQ_FOPS(fld_debugfs_hash);
 LDEBUGFS_FOPS_WR_ONLY(fld, cache_flush);
 
-struct lprocfs_vars fld_client_debugfs_list[] = {
+struct ldebugfs_vars fld_client_debugfs_list[] = {
        { .name =       "targets",
          .fops =       &fld_debugfs_targets_fops       },
        { .name =       "hash",
@@ -210,6 +209,7 @@ static void *fldb_seq_next(struct seq_file *p, void *v, loff_t *pos)
        const struct dt_it_ops  *iops;
        int                     rc;
 
+       ++*pos;
        if (param == NULL || param->fsp_stop)
                return NULL;