summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-01-27 17:42:53 +0530
committerVenky Shankar <vshankar@redhat.com>2015-01-27 18:44:08 -0800
commitee3d92e83c64b654b42c9ecc5b0cc3ad80a1d51b (patch)
tree288b997e63fda4c3b1a8b734a3d7d7a68bc09382 /xlators/features
parent6b22f5ba834e7ea382bee88f359a10faac407a77 (diff)
feature/changelog: Fix changelog and history scan failure.
Fixes bad file descriptor issue while cleaning up scratch directory during gf_changelog_register. Change-Id: Ia6aa8d55dcc2209144b48b6583681a155d919c42 BUG: 1162057 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/9495 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index a2257a66930..18eeac3e1a4 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -118,11 +118,12 @@ gf_changelog_open_dirs (gf_changelog_t *gfc)
gfc->gfc_working_dir);
ret = recursive_rmdir (gfc->gfc_current_dir);
- if (ret)
+ if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"Failed to rmdir: %s, err: %s",
gfc->gfc_current_dir, strerror (errno));
goto out;
+ }
ret = mkdir_p (gfc->gfc_current_dir, 0600, _gf_false);
if (ret)
@@ -141,11 +142,12 @@ gf_changelog_open_dirs (gf_changelog_t *gfc)
gfc->gfc_working_dir);
ret = recursive_rmdir (gfc->gfc_processing_dir);
- if (ret)
+ if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"Failed to rmdir: %s, err: %s",
gfc->gfc_processing_dir, strerror (errno));
goto out;
+ }
ret = mkdir_p (gfc->gfc_processing_dir, 0600, _gf_false);
if (ret)