From 3e05e2c69979119ca63b1ae5b775019d8bd27d31 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Thu, 30 Jul 2015 17:03:50 +0530 Subject: 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 BUG: 1243806 Change-Id: I1bc006172ebe5e417a5923f8be2f37a6277c5e5d Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/11811 Tested-by: NetBSD Build System Reviewed-by: N Balachandran Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY --- libglusterfs/src/logging.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 70149a2fd3c..147ee383751 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -292,18 +292,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; @@ -334,7 +322,6 @@ log_buf_init (log_buf_t *buf, const char *domain, const char *file, ret = 0; out: - THIS = old_THIS; return ret; } -- cgit