#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;
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,
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;
.fops = &lov_kbytesavail_fops },
{ .name = "desc_uuid",
.fops = &lov_desc_uuid_fops },
- { 0 }
+ { NULL }
};
struct file_operations lov_proc_target_fops = {
.llseek = seq_lseek,
.release = lprocfs_seq_release,
};
-#endif /* LPROCFS */
+#endif /* CONFIG_PROC_FS */