summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog7
-rw-r--r--runtime/procfs.c10
-rw-r--r--runtime/transport/ChangeLog17
-rw-r--r--runtime/transport/relayfs.c4
-rw-r--r--runtime/transport/transport.c8
-rw-r--r--runtime/transport/transport.h10
-rw-r--r--runtime/transport/utt.c4
7 files changed, 44 insertions, 16 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 35ce7c79..945a1894 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-12 David Smith <dsmith@redhat.com>
+
+ * procfs.c (_stp_rmdir_proc_module): Changed
+ _stp_lock_debugfs()/_stp_unlock_debugfs() to
+ _stp_lock_transport_dir()/_stp_unlock_transport_dir().
+ (_stp_mkdir_proc_module): Ditto.
+
2009-02-11 Tim Moore <timoore@redhat.com>
* stack.c (_stp_stack_print_fallback): Implementation that uses kernel
diff --git a/runtime/procfs.c b/runtime/procfs.c
index 4011ebfc..afedb4f4 100644
--- a/runtime/procfs.c
+++ b/runtime/procfs.c
@@ -45,7 +45,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 +62,7 @@ static void _stp_rmdir_proc_module(void)
_stp_proc_stap = NULL;
}
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
}
}
@@ -76,7 +76,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 +90,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 +110,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;
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index 02f9f119..f1a5a89b 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,20 @@
+2009-02-12 David Smith <dsmith@redhat.com>
+
+ * transport.c (_stp_lock_transport_dir): Renamed from
+ _stp_lock_debugfs(), since on older kernels this actually uses
+ procfs.
+ (_stp_unlock_transport_dir): Renamed from _stp_unlock_debugfs(),
+ since on older kernels this actually uses procfs.
+ (_stp_lock_transport_dir): Changed
+ _stp_lock_debugfs()/_stp_unlock_debugfs() to
+ _stp_lock_transport_dir()/_stp_unlock_transport_dir().
+ * transport.h: Ditto. Also added _stp_transport_init()
+ prototype.
+ * utt.c (utt_remove_root): Changed
+ _stp_lock_debugfs()/_stp_unlock_debugfs() to
+ _stp_lock_transport_dir()/_stp_unlock_transport_dir().
+ * relayfs.c (_stp_remove_relay_root): Ditto.
+
2009-02-05 Frank Ch. Eigler <fche@elastic.org>
PR9740/9816?
diff --git a/runtime/transport/relayfs.c b/runtime/transport/relayfs.c
index 5bd3ff4d..6eefda8d 100644
--- a/runtime/transport/relayfs.c
+++ b/runtime/transport/relayfs.c
@@ -68,12 +68,12 @@ static void _stp_remove_relay_dir(struct dentry *dir)
static void _stp_remove_relay_root(struct dentry *root)
{
if (root) {
- if (!_stp_lock_debugfs()) {
+ if (!_stp_lock_transport_dir()) {
errk("Unable to lock transport directory.\n");
return;
}
_stp_remove_relay_dir(root);
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
}
}
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
index 97fbf860..79da2101 100644
--- a/runtime/transport/transport.c
+++ b/runtime/transport/transport.c
@@ -311,7 +311,7 @@ static inline void _stp_unlock_inode(struct inode *inode)
static struct dentry *_stp_lockfile = NULL;
-static int _stp_lock_debugfs(void)
+static int _stp_lock_transport_dir(void)
{
int numtries = 0;
#ifdef STP_OLD_TRANSPORT
@@ -326,7 +326,7 @@ static int _stp_lock_debugfs(void)
return 1;
}
-static void _stp_unlock_debugfs(void)
+static void _stp_unlock_transport_dir(void)
{
if (_stp_lockfile) {
#ifdef STP_OLD_TRANSPORT
@@ -359,7 +359,7 @@ static struct dentry *_stp_get_root_dir(const char *name)
return NULL;
}
- if (!_stp_lock_debugfs()) {
+ if (!_stp_lock_transport_dir()) {
errk("Couldn't lock transport directory.\n");
return NULL;
}
@@ -381,7 +381,7 @@ static struct dentry *_stp_get_root_dir(const char *name)
errk("Could not create or find transport directory.\n");
}
}
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
return root;
}
diff --git a/runtime/transport/transport.h b/runtime/transport/transport.h
index 11a070de..7d249c45 100644
--- a/runtime/transport/transport.h
+++ b/runtime/transport/transport.h
@@ -26,13 +26,17 @@
static unsigned _stp_nsubbufs = 8;
static unsigned _stp_subbuf_size = 65536*4;
-static void _stp_warn (const char *fmt, ...);
+static int _stp_transport_init(void);
static void _stp_transport_close(void);
+
+static void _stp_warn (const char *fmt, ...);
static int _stp_print_init(void);
static void _stp_print_cleanup(void);
static struct dentry *_stp_get_root_dir(const char *name);
-static int _stp_lock_debugfs(void);
-static void _stp_unlock_debugfs(void);
+
+static int _stp_lock_transport_dir(void);
+static void _stp_unlock_transport_dir(void);
+
static void _stp_attach(void);
static void _stp_detach(void);
static void _stp_handle_start(struct _stp_msg_start *st);
diff --git a/runtime/transport/utt.c b/runtime/transport/utt.c
index 59060474..915662b2 100644
--- a/runtime/transport/utt.c
+++ b/runtime/transport/utt.c
@@ -130,13 +130,13 @@ static void utt_set_overwrite(int overwrite)
static void utt_remove_root(struct utt_trace *utt)
{
if (utt->utt_tree_root) {
- if (!_stp_lock_debugfs()) {
+ if (!_stp_lock_transport_dir()) {
errk("Unable to lock transport directory.\n");
return;
}
if (simple_empty(utt->utt_tree_root))
debugfs_remove(utt->utt_tree_root);
- _stp_unlock_debugfs();
+ _stp_unlock_transport_dir();
utt->utt_tree_root = NULL;
}
}