Mercurial > hg > nginx
comparison src/core/ngx_open_file_cache.c @ 1987:0e628cf11c29
back out the previous commit
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 29 Apr 2008 18:14:45 +0000 |
parents | 7df9b30e2361 |
children | 34051c712e41 |
comparison
equal
deleted
inserted
replaced
1986:7df9b30e2361 | 1987:0e628cf11c29 |
---|---|
171 | 171 |
172 if (file) { | 172 if (file) { |
173 | 173 |
174 file->uses++; | 174 file->uses++; |
175 | 175 |
176 ngx_queue_remove(&file->queue); | |
177 | |
176 if (file->fd == NGX_INVALID_FILE && file->err == 0 && !file->is_dir) { | 178 if (file->fd == NGX_INVALID_FILE && file->err == 0 && !file->is_dir) { |
177 | 179 |
178 /* file was not used often enough to keep open */ | 180 /* file was not used often enough to keep open */ |
179 | 181 |
180 rc = ngx_open_and_stat_file(name->data, of, pool->log); | 182 rc = ngx_open_and_stat_file(name->data, of, pool->log); |
181 | 183 |
182 if (rc != NGX_OK && (of->err == 0 || !of->errors)) { | 184 if (rc != NGX_OK && (of->err == 0 || !of->errors)) { |
183 goto failed; | 185 goto failed; |
184 } | 186 } |
185 | |
186 ngx_queue_remove(&file->queue); | |
187 | 187 |
188 goto add_event; | 188 goto add_event; |
189 } | 189 } |
190 | 190 |
191 if ((file->event && file->use_event) | 191 if ((file->event && file->use_event) |
209 } | 209 } |
210 | 210 |
211 } else { | 211 } else { |
212 of->err = file->err; | 212 of->err = file->err; |
213 } | 213 } |
214 | |
215 ngx_queue_remove(&file->queue); | |
216 | 214 |
217 goto found; | 215 goto found; |
218 } | 216 } |
219 | 217 |
220 ngx_log_debug4(NGX_LOG_DEBUG_CORE, pool->log, 0, | 218 ngx_log_debug4(NGX_LOG_DEBUG_CORE, pool->log, 0, |
235 rc = ngx_open_and_stat_file(name->data, of, pool->log); | 233 rc = ngx_open_and_stat_file(name->data, of, pool->log); |
236 | 234 |
237 if (rc != NGX_OK && (of->err == 0 || !of->errors)) { | 235 if (rc != NGX_OK && (of->err == 0 || !of->errors)) { |
238 goto failed; | 236 goto failed; |
239 } | 237 } |
240 | |
241 ngx_queue_remove(&file->queue); | |
242 | 238 |
243 if (of->is_dir) { | 239 if (of->is_dir) { |
244 | 240 |
245 if (file->is_dir || file->err) { | 241 if (file->is_dir || file->err) { |
246 goto update; | 242 goto update; |