diff options
Diffstat (limited to 'libglusterfs/src/cluster-syncop.c')
| -rw-r--r-- | libglusterfs/src/cluster-syncop.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libglusterfs/src/cluster-syncop.c b/libglusterfs/src/cluster-syncop.c index dab00577886..6ee89ddfdcf 100644 --- a/libglusterfs/src/cluster-syncop.c +++ b/libglusterfs/src/cluster-syncop.c @@ -14,8 +14,8 @@ /* NOTE: Cluster-syncop, like syncop blocks the executing thread until the * responses are gathered if it is not executed as part of synctask. So it * shouldn't be invoked in epoll worker thread */ -#include "cluster-syncop.h" -#include "defaults.h" +#include "glusterfs/cluster-syncop.h" +#include "glusterfs/defaults.h" #define FOP_ONLIST(subvols, on, numsubvols, replies, output, frame, fop, \ args...) \ @@ -1203,6 +1203,10 @@ cluster_tiebreaker_inodelk(xlator_t **subvols, unsigned char *on, if (num_success) { FOP_SEQ(subvols, on, numsubvols, replies, locked_on, frame, inodelk, dom, &loc, F_SETLKW, &flock, NULL); + } else { + loc_wipe(&loc); + memset(locked_on, 0, numsubvols); + return 0; } break; } @@ -1244,7 +1248,9 @@ cluster_tiebreaker_entrylk(xlator_t **subvols, unsigned char *on, entrylk, dom, &loc, name, ENTRYLK_LOCK, ENTRYLK_WRLCK, NULL); } else { + loc_wipe(&loc); memset(locked_on, 0, numsubvols); + return 0; } break; } |
