summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@fb.com>2017-07-07 07:49:45 -0700
committerJeff Darcy <jeff@pl.atyp.us>2017-07-09 03:57:26 +0000
commit028d82b8a2434cb6d5ad707500f6dea2125ea2fa (patch)
tree51ed3680ab4dd849e65ac646b7bf698f23d6bc49 /api
parent0ae38df6403942a2438404d46a6e05b503db3485 (diff)
gfapi+libglusterfs: fix mem_pools_fini without mem_pools_init case
The change consists of two parts: make sure it doesn't happen (in glfs.c), and make it harmless if it does (in mem-pool.c). Change-Id: Icb7dda7a45dd3d1ade2ee3991bb6a22c8ec88424 BUG: 1468863 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17728 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 5c77a63d101..0eb25a222de 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -745,6 +745,12 @@ pub_glfs_new (const char *volname)
return NULL;
}
+ /*
+ * Do this as soon as possible in case something else depends on
+ * pool allocations.
+ */
+ mem_pools_init ();
+
fs = glfs_new_fs (volname);
if (!fs)
return NULL;
@@ -1026,12 +1032,6 @@ pub_glfs_init (struct glfs *fs)
return ret;
}
- /*
- * Do this as soon as possible in case something else depends on
- * pool allocations.
- */
- mem_pools_init ();
-
__GLFS_ENTRY_VALIDATE_FS (fs, invalid_fs);
ret = glfs_init_common (fs);