#include <lprocfs_status.h>
#include <lustre/lustre_idl.h>
-#if defined(LPROCFS)
+#ifdef CONFIG_PROC_FS
/*
* JobID formats & JobID environment variable names for supported
struct seq_file *seq;
int rc;
- if (LPROCFS_ENTRY_CHECK(PDE(inode)))
- return -ENOENT;
+ rc = LPROCFS_ENTRY_CHECK(inode);
+ if (rc < 0)
+ return rc;
rc = seq_open(file, &lprocfs_jobstats_seq_sops);
if (rc)
stats->ojs_cleanup_interval = 600; /* 10 mins by default */
stats->ojs_last_cleanup = cfs_time_current_sec();
- LPROCFS_WRITE_ENTRY();
- entry = proc_create_data("job_stats", 0644, obd->obd_proc_entry,
- &lprocfs_jobstats_seq_fops, stats);
- LPROCFS_WRITE_EXIT();
- if (entry == NULL) {
+ entry = lprocfs_add_simple(obd->obd_proc_entry, "job_stats", stats,
+ &lprocfs_jobstats_seq_fops);
+ if (IS_ERR(entry)) {
lprocfs_job_stats_fini(obd);
RETURN(-ENOMEM);
}
return count;
}
EXPORT_SYMBOL(lprocfs_job_interval_seq_write);
-#endif /* LPROCFS*/
+#endif /* CONFIG_PROC_FS*/