Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-09-14 18:12:35 +0400
committerIgor Sysoev <igor@sysoev.ru>2011-09-14 18:12:35 +0400
commit7ffb73c6b78aa40eafd6589b68f2ce613b86cc00 (patch)
tree25c64878c2167e4716a3b8a92b306598fcd933ff /src/core/ngx_open_file_cache.c
parent2cc42b74c74ffce440beebd11ceb65cc48f45d75 (diff)
Bugfix: open_file_cache did not update file info on retest.
If file inode was not changed, cached file information was not updated on retest. As a result stale information might be cached forever if file attributes was changed and/or file was extended. This fix also makes obsolete r4077 change of is_directio flag handling, since this flag is updated together with other file information.
Diffstat (limited to 'src/core/ngx_open_file_cache.c')
-rw-r--r--src/core/ngx_open_file_cache.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index 1cce9e92b..1306d14b0 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -284,15 +284,11 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name,
if (of->uniq == file->uniq) {
- file->count++;
-
if (file->event) {
file->use_event = 1;
}
- of->is_directio = file->is_directio;
-
- goto renew;
+ goto update;
}
/* file was changed */
@@ -396,8 +392,6 @@ update:
}
}
-renew:
-
file->created = now;
found: