Skip to content

Commit dae26db

Browse files
committed
dht-rebalance.c: fix clang compilation warning
Fix: dht-rebalance.c:2259:33: warning: implicit conversion from enumeration type 'enum entrylk_cmd' to different enumeration type 'entrylk_type' (aka 'enum entrylk_type') [-Wenum-conversion] 2257 | lk_ret = syncop_entrylk(hashed_subvol, DHT_ENTRY_SYNC_DOMAIN, | ~~~~~~~~~~~~~~ 2258 | &parent_loc, loc->name, ENTRYLK_UNLOCK, 2259 | ENTRYLK_UNLOCK, NULL, NULL); | ^~~~~~~~~~~~~~ This is not very clear - there's a very clear copy-pasta here, but is the fix to turn it into ENTRYLK_WRLCK ? Every other caller seem to think so, so this is the change. Signed-off-by: Yaniv Kaul <[email protected]>
1 parent c4794c2 commit dae26db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xlators/cluster/dht/src/dht-rebalance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ dht_migrate_file(xlator_t *this, loc_t *loc, xlator_t *cached_subvol,
22562256
if (entrylk_locked) {
22572257
lk_ret = syncop_entrylk(hashed_subvol, DHT_ENTRY_SYNC_DOMAIN,
22582258
&parent_loc, loc->name, ENTRYLK_UNLOCK,
2259-
ENTRYLK_UNLOCK, NULL, NULL);
2259+
ENTRYLK_WRLCK, NULL, NULL);
22602260
if (lk_ret < 0) {
22612261
gf_msg(this->name, GF_LOG_WARNING, -lk_ret,
22622262
DHT_MSG_MIGRATE_FILE_FAILED,

0 commit comments

Comments
 (0)