summaryrefslogtreecommitdiffstats
path: root/runtime/procfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/procfs.c')
-rw-r--r--runtime/procfs.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/runtime/procfs.c b/runtime/procfs.c
index 4011ebfc..d6b75336 100644
--- a/runtime/procfs.c
+++ b/runtime/procfs.c
@@ -14,9 +14,11 @@
* number of needed files.
*/
+#ifndef _STP_PROCFS_C_
+#define _STP_PROCFS_C_
+
#define STP_MAX_PROCFS_FILES 16
static int _stp_num_pde = 0;
-static int _stp_num_procfs_files = 0;
static struct proc_dir_entry *_stp_pde[STP_MAX_PROCFS_FILES];
static struct proc_dir_entry *_stp_procfs_files[STP_MAX_PROCFS_FILES];
static struct proc_dir_entry *_stp_proc_stap = NULL;
@@ -45,7 +47,7 @@ static void _stp_rmdir_proc_module(void)
}
if (_stp_proc_stap) {
- if (!_stp_lock_debugfs()) {
+ if (!_stp_lock_transport_dir()) {
errk("Unable to lock transport directory.\n");
return;
}
@@ -62,7 +64,7 @@ static void _stp_rmdir_proc_module(void)
_stp_proc_stap = NULL;
}
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
}
}
@@ -76,7 +78,7 @@ static int _stp_mkdir_proc_module(void)
if (_stp_proc_root == NULL) {
struct nameidata nd;
- if (!_stp_lock_debugfs()) {
+ if (!_stp_lock_transport_dir()) {
errk("Unable to lock transport directory.\n");
goto done;
}
@@ -90,7 +92,7 @@ static int _stp_mkdir_proc_module(void)
/* doesn't exist, so create it */
_stp_proc_stap = proc_mkdir ("systemtap", NULL);
if (_stp_proc_stap == NULL) {
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
goto done;
}
} else {
@@ -110,7 +112,7 @@ static int _stp_mkdir_proc_module(void)
_stp_proc_root->owner = THIS_MODULE;
#endif
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
}
done:
return (_stp_proc_root) ? 1 : 0;
@@ -209,3 +211,5 @@ static void _stp_close_procfs(void)
_stp_num_pde = 0;
_stp_rmdir_proc_module();
}
+
+#endif /* _STP_PROCFS_C_ */