From 22f02d8f1dcdf176744ab1536cb23a5fcd291243 Mon Sep 17 00:00:00 2001 From: Vitaly Lipatov Date: Tue, 31 Jan 2017 21:18:05 +0300 Subject: md-cache: initialize mdc_counter.lock add missed LOCK_INIT to fix INCREMENT_ATOMIC on conf->mdc_counter.lock when pthread_spin_* using Change-Id: I680bd6f41e3b8a1852ed969bf6794cbf4c1ccdd4 BUG: 1417913 Signed-off-by: Vitaly Lipatov Reviewed-on: https://review.gluster.org/16515 Reviewed-by: Niels de Vos Tested-by: Niels de Vos Smoke: Gluster Build System Reviewed-by: Raghavendra G NetBSD-regression: NetBSD Build System Reviewed-by: Poornima G CentOS-regression: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/performance/md-cache/src/md-cache.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/performance/md-cache/src/md-cache.c') diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index 026b890cd85..eb1032b3c91 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -2983,6 +2983,7 @@ init (xlator_t *this) GF_OPTION_INIT("cache-invalidation", conf->mdc_invalidation, bool, out); LOCK_INIT (&conf->lock); + LOCK_INIT (&conf->mdc_counter.lock); time (&conf->last_child_down); /* If timeout is greater than 60s (default before the patch that added -- cgit