diff options
Diffstat (limited to 'api/src/glfs.c')
| -rw-r--r-- | api/src/glfs.c | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c index d9f07603b0f..5c77a63d101 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -1026,6 +1026,12 @@ 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); @@ -1278,6 +1284,12 @@ pub_glfs_fini (struct glfs *fs)  free_fs:          glfs_free_from_ctx (fs); +        /* +         * Do this as late as possible in case anything else has (or +         * grows) a dependency on mem-pool allocations. +         */ +        mem_pools_fini (); +  fail:          if (!ret)                  ret = err;  | 
