summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-07-07 11:41:04 -0400
committerDave Brolley <brolley@redhat.com>2009-07-07 11:41:04 -0400
commit271691992a2e790cfa40df61b42de38be75d0677 (patch)
tree65b414dad0c70c26887f86cc3d9add438d14c4eb /runtime
parent22b631a3708bcd731bb99db6a3c78cbf2063c18e (diff)
parent83eaf9b5f3d1f1287b7962efc6bc703357b984ba (diff)
downloadsystemtap-steved-271691992a2e790cfa40df61b42de38be75d0677.tar.gz
systemtap-steved-271691992a2e790cfa40df61b42de38be75d0677.tar.xz
systemtap-steved-271691992a2e790cfa40df61b42de38be75d0677.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime')
-rw-r--r--runtime/procfs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/runtime/procfs.c b/runtime/procfs.c
index d6b75336..1d2ad837 100644
--- a/runtime/procfs.c
+++ b/runtime/procfs.c
@@ -38,6 +38,11 @@ static void _stp_close_procfs(void);
*/
static void _stp_rmdir_proc_module(void)
{
+ if (!_stp_lock_transport_dir()) {
+ errk("Unable to lock transport directory.\n");
+ return;
+ }
+
if (_stp_proc_root && _stp_proc_root->subdir == NULL) {
if (atomic_read(&_stp_proc_root->count) != LAST_ENTRY_COUNT)
_stp_warn("Removal of /proc/systemtap/%s\nis deferred until it is no longer in use.\n"
@@ -46,12 +51,7 @@ static void _stp_rmdir_proc_module(void)
_stp_proc_root = NULL;
}
- if (_stp_proc_stap) {
- if (!_stp_lock_transport_dir()) {
- errk("Unable to lock transport directory.\n");
- return;
- }
-
+ if (_stp_proc_stap && _stp_proc_stap->subdir == NULL) {
/* Important! Do not attempt removal of /proc/systemtap */
/* if in use. This will put the PDE in deleted state */
/* pending usage count dropping to 0. During this time, */
@@ -63,9 +63,8 @@ static void _stp_rmdir_proc_module(void)
remove_proc_entry("systemtap", NULL);
_stp_proc_stap = NULL;
}
-
- _stp_unlock_transport_dir();
}
+ _stp_unlock_transport_dir();
}