summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-internal.h1
-rw-r--r--api/src/glfs.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index 0d67b6e249d..6380cd2ae2b 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -30,6 +30,7 @@ struct glfs {
pthread_cond_t cond;
int init;
int ret;
+ int err;
xlator_t *active_subvol;
diff --git a/api/src/glfs.c b/api/src/glfs.c
index af2378f77aa..017a55b1be8 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -460,6 +460,7 @@ glfs_init_wait (struct glfs *fs)
pthread_cond_wait (&fs->cond,
&fs->mutex);
ret = fs->ret;
+ errno = fs->err;
}
pthread_mutex_unlock (&fs->mutex);
@@ -479,6 +480,7 @@ glfs_init_done (struct glfs *fs, int ret)
{
fs->init = 1;
fs->ret = ret;
+ fs->err = errno;
pthread_cond_broadcast (&fs->cond);
}