mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
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.
This commit is contained in:
parent
2cc42b74c7
commit
7ffb73c6b7
@ -284,15 +284,11 @@ ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name,
|
|||||||
|
|
||||||
if (of->uniq == file->uniq) {
|
if (of->uniq == file->uniq) {
|
||||||
|
|
||||||
file->count++;
|
|
||||||
|
|
||||||
if (file->event) {
|
if (file->event) {
|
||||||
file->use_event = 1;
|
file->use_event = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
of->is_directio = file->is_directio;
|
goto update;
|
||||||
|
|
||||||
goto renew;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* file was changed */
|
/* file was changed */
|
||||||
@ -396,8 +392,6 @@ update:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renew:
|
|
||||||
|
|
||||||
file->created = now;
|
file->created = now;
|
||||||
|
|
||||||
found:
|
found:
|
||||||
|
Loading…
Reference in New Issue
Block a user