diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-04-29 22:14:45 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-04-29 22:14:45 +0400 |
commit | ada9190ed84948cd101c7b30cbb4695dd6ef76b4 (patch) | |
tree | 6e7c5c646ced05cff9feee3460f46e86bc873e83 /src/core/ngx_open_file_cache.c | |
parent | 4de5124191641709499f0b3e8c32ef84b04d2ec8 (diff) |
back out the previous commit
Diffstat (limited to 'src/core/ngx_open_file_cache.c')
-rw-r--r-- | src/core/ngx_open_file_cache.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c index c217818f3..a1692f101 100644 --- a/src/core/ngx_open_file_cache.c +++ b/src/core/ngx_open_file_cache.c @@ -173,6 +173,8 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name, file->uses++; + ngx_queue_remove(&file->queue); + if (file->fd == NGX_INVALID_FILE && file->err == 0 && !file->is_dir) { /* file was not used often enough to keep open */ @@ -183,8 +185,6 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name, goto failed; } - ngx_queue_remove(&file->queue); - goto add_event; } @@ -212,8 +212,6 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name, of->err = file->err; } - ngx_queue_remove(&file->queue); - goto found; } @@ -238,8 +236,6 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name, goto failed; } - ngx_queue_remove(&file->queue); - if (of->is_dir) { if (file->is_dir || file->err) { |