aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_file_cache.c
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2016-03-23 14:16:31 +0300
committerDmitry Volyntsev <xeioex@nginx.com>2016-03-23 14:16:31 +0300
commit24e38323ee2cf7b3c0f2f23e2b629aed57ecac42 (patch)
tree04b0d920b73ecc999c46d703c9c25d1c958650a7 /src/http/ngx_http_file_cache.c
parent0b768c143594706d1fb99fbe842d27de375bd5be (diff)
downloadnginx-24e38323ee2cf7b3c0f2f23e2b629aed57ecac42.tar.gz
nginx-24e38323ee2cf7b3c0f2f23e2b629aed57ecac42.zip
Cache: fixed slots accounting error introduced in c9d680b00744.
Diffstat (limited to 'src/http/ngx_http_file_cache.c')
-rw-r--r--src/http/ngx_http_file_cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 63ce6bb21..3561028f0 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -2115,12 +2115,12 @@ ngx_http_file_cache_add(ngx_http_file_cache_t *cache, ngx_http_cache_t *c)
"could not allocate node%s", cache->shpool->log_ctx);
}
- cache->sh->count++;
-
ngx_shmtx_unlock(&cache->shpool->mutex);
return NGX_ERROR;
}
+ cache->sh->count++;
+
ngx_memcpy((u_char *) &fcn->node.key, c->key, sizeof(ngx_rbtree_key_t));
ngx_memcpy(fcn->key, &c->key[sizeof(ngx_rbtree_key_t)],