Whamcloud - gitweb
LU-6124 test: skip tests require remote server with nodsh set
[fs/lustre-release.git] / lustre / lov / lproc_lov.c
index f19d249..80d1a29 100644 (file)
@@ -42,7 +42,7 @@
 #include <lustre_param.h>
 #include "lov_internal.h"
 
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
 static int lov_stripesize_seq_show(struct seq_file *m, void *v)
 {
        struct obd_device *dev = (struct obd_device *)m->private;
@@ -236,7 +236,7 @@ static int lov_tgt_seq_show(struct seq_file *p, void *v)
                          tgt->ltd_active ? "" : "IN");
 }
 
-struct seq_operations lov_tgt_sops = {
+static const struct seq_operations lov_tgt_sops = {
         .start = lov_tgt_seq_start,
         .stop = lov_tgt_seq_stop,
         .next = lov_tgt_seq_next,
@@ -248,7 +248,10 @@ static int lov_target_seq_open(struct inode *inode, struct file *file)
        struct seq_file *seq;
        int rc;
 
-       LPROCFS_ENTRY_CHECK(PDE(inode));
+       rc = LPROCFS_ENTRY_CHECK(inode);
+       if (rc < 0)
+               return rc;
+
        rc = seq_open(file, &lov_tgt_sops);
        if (rc)
                return rc;
@@ -295,7 +298,7 @@ struct lprocfs_vars lprocfs_lov_obd_vars[] = {
          .fops =       &lov_kbytesavail_fops   },
        { .name =       "desc_uuid",
          .fops =       &lov_desc_uuid_fops     },
-       { 0 }
+       { NULL }
 };
 
 struct file_operations lov_proc_target_fops = {
@@ -305,4 +308,4 @@ struct file_operations lov_proc_target_fops = {
         .llseek  = seq_lseek,
         .release = lprocfs_seq_release,
 };
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */