summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/fd.c')
-rw-r--r--libglusterfs/src/fd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index d31b106aa8b..30a7494540d 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -484,7 +484,7 @@ fd_destroy (fd_t *fd, gf_boolean_t bound)
xl = fd->_ctx[i].xl_key;
old_THIS = THIS;
THIS = xl;
- if (xl->cbks->releasedir)
+ if (!xl->call_cleanup && xl->cbks->releasedir)
xl->cbks->releasedir (xl, fd);
THIS = old_THIS;
}
@@ -495,7 +495,7 @@ fd_destroy (fd_t *fd, gf_boolean_t bound)
xl = fd->_ctx[i].xl_key;
old_THIS = THIS;
THIS = xl;
- if (xl->cbks->release)
+ if (!xl->call_cleanup && xl->cbks->release)
xl->cbks->release (xl, fd);
THIS = old_THIS;
}