diff options
-rw-r--r-- | api/src/glfs-internal.h | 1 | ||||
-rw-r--r-- | api/src/glfs.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h index 0d67b6e249..6380cd2ae2 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 af2378f77a..017a55b1be 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); } |