summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2013-10-16 00:56:01 +0530
committerAnand Avati <avati@redhat.com>2013-10-30 15:21:50 -0700
commit56be81f0e06b6158da86328d293fbb09d711791d (patch)
tree852cf9e76ac063ee38f688cc887f7db505a29caa /api/src
parent65dd4dd4f553d9e2b7c2d19d66ce2f36a4ee7de9 (diff)
gfapi: fix return value of glfs_fini
Change-Id: I5b90c7602334226a978bbdae2f9516e8701b403f BUG: 1004519 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6093 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'api/src')
-rw-r--r--api/src/glfs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index f93ebee44..da090abae 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -594,11 +594,11 @@ glfs_init (struct glfs *fs)
int
glfs_fini (struct glfs *fs)
{
- int ret = -1;
- xlator_t *subvol = NULL;
+ int ret = -1;
+ int countdown = 100;
+ xlator_t *subvol = NULL;
glusterfs_ctx_t *ctx = NULL;
- call_pool_t *call_pool = NULL;
- int countdown = 100;
+ call_pool_t *call_pool = NULL;
ctx = fs->ctx;
@@ -619,6 +619,10 @@ glfs_fini (struct glfs *fs)
}
/* leaked frames may exist, we ignore */
+ /*We deem glfs_fini as successful if there are no pending frames in the call
+ *pool*/
+ ret = (call_pool->cnt == 0)? 0: -1;
+
subvol = glfs_active_subvol (fs);
if (subvol) {
/* PARENT_DOWN within glfs_subvol_done() is issued only