Mercurial > hg > nginx-quic
comparison src/core/ngx_open_file_cache.c @ 4100:efeee901439a
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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 14 Sep 2011 14:12:35 +0000 |
parents | 37da005a5808 |
children | 31cf2902de60 |
comparison
equal
deleted
inserted
replaced
4099:9ee6944590c0 | 4100:efeee901439a |
---|---|
282 goto add_event; | 282 goto add_event; |
283 } | 283 } |
284 | 284 |
285 if (of->uniq == file->uniq) { | 285 if (of->uniq == file->uniq) { |
286 | 286 |
287 file->count++; | |
288 | |
289 if (file->event) { | 287 if (file->event) { |
290 file->use_event = 1; | 288 file->use_event = 1; |
291 } | 289 } |
292 | 290 |
293 of->is_directio = file->is_directio; | 291 goto update; |
294 | |
295 goto renew; | |
296 } | 292 } |
297 | 293 |
298 /* file was changed */ | 294 /* file was changed */ |
299 | 295 |
300 } else { /* error to cache */ | 296 } else { /* error to cache */ |
393 | 389 |
394 if (!of->is_dir) { | 390 if (!of->is_dir) { |
395 file->count++; | 391 file->count++; |
396 } | 392 } |
397 } | 393 } |
398 | |
399 renew: | |
400 | 394 |
401 file->created = now; | 395 file->created = now; |
402 | 396 |
403 found: | 397 found: |
404 | 398 |