mirror of
https://github.com/opnsense/src.git
synced 2026-07-15 04:01:09 -04:00
Document that when we are addressing an open()/close() race, the reason
we call vn_close() manually rather than letting fdrop() take care of it is that we haven't yet hooked up the various 'struct file' fields.
This commit is contained in:
parent
cec4ab6a04
commit
69546b2fbb
2 changed files with 4 additions and 0 deletions
|
|
@ -1018,6 +1018,8 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
|||
* Handle the case where someone closed the file (via its file
|
||||
* descriptor) while we were blocked. The end result should look
|
||||
* like opening the file succeeded but it was immediately closed.
|
||||
* We call vn_close() manually because we haven't yet hooked up
|
||||
* the various 'struct file' fields.
|
||||
*/
|
||||
FILEDESC_LOCK(fdp);
|
||||
FILE_LOCK(fp);
|
||||
|
|
|
|||
|
|
@ -1018,6 +1018,8 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
|||
* Handle the case where someone closed the file (via its file
|
||||
* descriptor) while we were blocked. The end result should look
|
||||
* like opening the file succeeded but it was immediately closed.
|
||||
* We call vn_close() manually because we haven't yet hooked up
|
||||
* the various 'struct file' fields.
|
||||
*/
|
||||
FILEDESC_LOCK(fdp);
|
||||
FILE_LOCK(fp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue