Whamcloud - gitweb
Revert "LU-5275 lprocfs: remove last of non seq data structs and functions."
[fs/lustre-release.git] / lustre / ptlrpc / nodemap_lproc.c
index 0f4cfe4..1142ec6 100644 (file)
@@ -879,7 +879,7 @@ out:
 LPROC_SEQ_FOPS_WO_TYPE(nodemap, del_nodemap_idmap);
 #endif /* NODEMAP_PROC_DEBUG */
 
-static struct lprocfs_vars lprocfs_nm_module_vars[] = {
+static struct lprocfs_seq_vars lprocfs_nm_module_vars[] = {
        {
                .name           = "active",
                .fops           = &nodemap_active_fops,
@@ -948,7 +948,7 @@ const struct file_operations nodemap_exports_fops = {
        .release                = single_release
 };
 
-static struct lprocfs_vars lprocfs_nodemap_vars[] = {
+static struct lprocfs_seq_vars lprocfs_nodemap_vars[] = {
        {
                .name           = "id",
                .fops           = &nodemap_id_fops,
@@ -986,7 +986,7 @@ static struct lprocfs_vars lprocfs_nodemap_vars[] = {
        }
 };
 
-static struct lprocfs_vars lprocfs_default_nodemap_vars[] = {
+static struct lprocfs_seq_vars lprocfs_default_nodemap_vars[] = {
        {
                .name           = "id",
                .fops           = &nodemap_id_fops,
@@ -1025,10 +1025,10 @@ int nodemap_procfs_init(void)
 {
        int rc = 0;
 
-       proc_lustre_nodemap_root = lprocfs_register(LUSTRE_NODEMAP_NAME,
-                                                   proc_lustre_root,
-                                                   lprocfs_nm_module_vars,
-                                                   NULL);
+       proc_lustre_nodemap_root = lprocfs_seq_register(LUSTRE_NODEMAP_NAME,
+                                                       proc_lustre_root,
+                                                       lprocfs_nm_module_vars,
+                                                       NULL);
 
        if (IS_ERR(proc_lustre_nodemap_root)) {
                rc = PTR_ERR(proc_lustre_nodemap_root);
@@ -1052,16 +1052,21 @@ int lprocfs_nodemap_register(const char *name,
                             struct lu_nodemap *nodemap)
 {
        struct proc_dir_entry   *nodemap_proc_entry;
-       struct lprocfs_vars     *vars;
        int                     rc = 0;
 
        if (is_default)
-               vars = lprocfs_default_nodemap_vars;
+               nodemap_proc_entry =
+                       lprocfs_seq_register(name,
+                                            proc_lustre_nodemap_root,
+                                            lprocfs_default_nodemap_vars,
+                                            nodemap);
        else
-               vars = lprocfs_nodemap_vars;
+               nodemap_proc_entry =
+                       lprocfs_seq_register(name,
+                                            proc_lustre_nodemap_root,
+                                            lprocfs_nodemap_vars,
+                                            nodemap);
 
-       nodemap_proc_entry = lprocfs_register(name, proc_lustre_nodemap_root,
-                                             vars, nodemap);
        if (IS_ERR(nodemap_proc_entry)) {
                rc = PTR_ERR(nodemap_proc_entry);
                CERROR("cannot create 'nodemap/%s': rc = %d\n", name, rc);