summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/syncdutils.py
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-11 04:09:17 +0000
committerAnand Avati <avati@gluster.com>2011-04-11 03:52:33 -0700
commit86a091ac0d46ce2b06b79ceafe728ee65fc6ebbf (patch)
tree650209d3f96e06d9d610177bcd626e55e8bfdfff /xlators/features/marker/utils/syncdaemon/syncdutils.py
parent2f38fdac226b5b5bd02a78e9933ec46b05cac32d (diff)
syncdaemon: fix transaction code
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2659 (gsync config-del option is not working properly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2659
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/syncdutils.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/syncdutils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/syncdutils.py b/xlators/features/marker/utils/syncdaemon/syncdutils.py
index 5c17d0579..d3ab2f345 100644
--- a/xlators/features/marker/utils/syncdaemon/syncdutils.py
+++ b/xlators/features/marker/utils/syncdaemon/syncdutils.py
@@ -24,7 +24,8 @@ def update_file(path, updater, merger = lambda f: True):
os.close(fd)
raise
fcntl.lockf(fr, fcntl.LOCK_EX)
- merger(fr)
+ if not merger(fr):
+ return
tmpp = path + '.tmp.' + str(os.getpid())
fd = os.open(tmpp, os.O_CREAT|os.O_EXCL|os.O_WRONLY)