Whamcloud - gitweb
LU-13811 client: don't panic for mgs evictions
[fs/lustre-release.git] / lustre / ptlrpc / nodemap_lproc.c
index 87feff4..e6f109c 100644 (file)
@@ -118,7 +118,6 @@ static int nodemap_ranges_show(struct seq_file *m, void *data)
 {
        struct lu_nodemap               *nodemap;
        struct lu_nid_range             *range;
-       struct interval_node_extent     ext;
        char                            start_nidstr[LNET_NIDSTR_SIZE];
        char                            end_nidstr[LNET_NIDSTR_SIZE];
        bool                            cont = false;
@@ -140,9 +139,8 @@ static int nodemap_ranges_show(struct seq_file *m, void *data)
                if (cont)
                        seq_printf(m, ",\n");
                cont = 1;
-               ext = range->rn_node.in_extent;
-               libcfs_nid2str_r(ext.start, start_nidstr, sizeof(start_nidstr));
-               libcfs_nid2str_r(ext.end, end_nidstr, sizeof(end_nidstr));
+               libcfs_nid2str_r(range->rn_start, start_nidstr, sizeof(start_nidstr));
+               libcfs_nid2str_r(range->rn_end, end_nidstr, sizeof(end_nidstr));
                seq_printf(m, " { id: %u, start_nid: %s, end_nid: %s }",
                           range->rn_id, start_nidstr, end_nidstr);
        }
@@ -684,25 +682,25 @@ LPROC_SEQ_FOPS_RO(nodemap_map_mode);
 LPROC_SEQ_FOPS_RO(nodemap_audit_mode);
 LPROC_SEQ_FOPS_RO(nodemap_forbid_encryption);
 
-static const struct file_operations nodemap_ranges_fops = {
-       .open                   = nodemap_ranges_open,
-       .read                   = seq_read,
-       .llseek                 = seq_lseek,
-       .release                = single_release
+static const struct proc_ops nodemap_ranges_fops = {
+       .proc_open              = nodemap_ranges_open,
+       .proc_read              = seq_read,
+       .proc_lseek             = seq_lseek,
+       .proc_release           = single_release
 };
 
-static const struct file_operations nodemap_idmap_fops = {
-       .open                   = nodemap_idmap_open,
-       .read                   = seq_read,
-       .llseek                 = seq_lseek,
-       .release                = single_release
+static const struct proc_ops nodemap_idmap_fops = {
+       .proc_open              = nodemap_idmap_open,
+       .proc_read              = seq_read,
+       .proc_lseek             = seq_lseek,
+       .proc_release           = single_release
 };
 
-static const struct file_operations nodemap_exports_fops = {
-       .open                   = nodemap_exports_open,
-       .read                   = seq_read,
-       .llseek                 = seq_lseek,
-       .release                = single_release
+static const struct proc_ops nodemap_exports_fops = {
+       .proc_open              = nodemap_exports_open,
+       .proc_read              = seq_read,
+       .proc_lseek             = seq_lseek,
+       .proc_release           = single_release
 };
 
 static struct lprocfs_vars lprocfs_nodemap_vars[] = {