Whamcloud - gitweb
LU-5319 mdc: manage number of modify RPCs in flight
[fs/lustre-release.git] / lustre / fid / lproc_fid.c
index 4338690..aa16d81 100644 (file)
@@ -51,7 +51,7 @@
 #include <lprocfs_status.h>
 #include "fid_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 
 /* Format: [0x64BIT_INT - 0x64BIT_INT] + 32 bytes just in case */
 #define MAX_FID_RANGE_STRLEN (32 + 2 * 2 * sizeof(__u64))
@@ -213,7 +213,7 @@ LPROC_SEQ_FOPS(lprocfs_server_fid_space);
 LPROC_SEQ_FOPS(lprocfs_server_fid_width);
 LPROC_SEQ_FOPS_RO(lprocfs_server_fid_server);
 
-struct lprocfs_seq_vars seq_server_proc_list[] = {
+struct lprocfs_vars seq_server_proc_list[] = {
        { .name =       "space",
          .fops =       &lprocfs_server_fid_space_fops  },
        { .name =       "width",
@@ -361,7 +361,10 @@ static int fldb_seq_open(struct inode *inode, struct file *file)
        fld = ss->lss_site->ss_server_fld;
        LASSERT(fld != NULL);
 
-       LPROCFS_ENTRY_CHECK(PDE(inode));
+       rc = LPROCFS_ENTRY_CHECK(inode);
+       if (rc < 0)
+               return rc;
+
        rc = seq_open(file, &fldb_sops);
        if (rc)
                return rc;
@@ -383,7 +386,7 @@ static int fldb_seq_open(struct inode *inode, struct file *file)
 
        env_init = 1;
        iops = &obj->do_index_ops->dio_it;
-       param->fsp_it = iops->init(&param->fsp_env, obj, 0, NULL);
+       param->fsp_it = iops->init(&param->fsp_env, obj, 0);
        if (IS_ERR(param->fsp_it))
                GOTO(out, rc = PTR_ERR(param->fsp_it));
 
@@ -570,10 +573,8 @@ lprocfs_client_fid_width_seq_write(struct file *file, const char __user *buffer,
        if (val <= max && val > 0) {
                seq->lcs_width = val;
 
-               if (rc == 0) {
-                       CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
-                              seq->lcs_name, seq->lcs_width);
-               }
+               CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
+                      seq->lcs_name, seq->lcs_width);
        }
        mutex_unlock(&seq->lcs_mutex);
 
@@ -636,7 +637,7 @@ LPROC_SEQ_FOPS(lprocfs_client_fid_width);
 LPROC_SEQ_FOPS_RO(lprocfs_client_fid_server);
 LPROC_SEQ_FOPS_RO(lprocfs_client_fid_fid);
 
-struct lprocfs_seq_vars seq_client_proc_list[] = {
+struct lprocfs_vars seq_client_proc_list[] = {
        { .name =       "space",
          .fops =       &lprocfs_client_fid_space_fops  },
        { .name =       "width",
@@ -647,4 +648,5 @@ struct lprocfs_seq_vars seq_client_proc_list[] = {
          .fops =       &lprocfs_client_fid_fid_fops    },
        { NULL }
 };
-#endif
+
+#endif /* CONFIG_PROC_FS */