summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-07-30 17:03:50 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-08-18 10:07:20 -0700
commiteeb05e207dc6a0354ca2489f4b8e07f1800c8eb8 (patch)
tree7c84192d319bd4602fc75ddd8b1264ed751143df /libglusterfs
parenta9355e7a3963d7f1f33ca868174d5bcc805d2b63 (diff)
logging: Stop using global xlator for log_buf allocations
This reverts commit 765849ee00f6661c9059122ff2346b03b224745f. With http://review.gluster.org/#/c/10417/, struct mem_accnt is no longer embedded in a xlator_t object, but instead is allocated separately. Hence this workaround provided to avoid crashes in logging infrastructure is no longer needed This is a backport of the below fix - http://review.gluster.org/11811 BUG: 1254436 Change-Id: I4bbf7649bdc29424ff1bb878f79e99328efa0b3e Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11811 Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11946 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/logging.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 588edb491e6..af14163c360 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -297,18 +297,6 @@ log_buf_init (log_buf_t *buf, const char *domain, const char *file,
int errnum, uint64_t msgid, char **appmsgstr, int graph_id)
{
int ret = -1;
- xlator_t *old_THIS;
- extern xlator_t global_xlator;
-
- /*
- * The current translator will be put in the block header for any
- * memory block we allocate here. Unfortunately, these objects might
- * outlive the current translator, and if we then try to dereference
- * that pointer we go BOOM. Since this is really a global structure,
- * use the global translator.
- */
- old_THIS = THIS;
- THIS = &global_xlator;
if (!buf || !domain || !file || !function || !appmsgstr || !*appmsgstr)
goto out;
@@ -339,7 +327,6 @@ log_buf_init (log_buf_t *buf, const char *domain, const char *file,
ret = 0;
out:
- THIS = old_THIS;
return ret;
}