We'll subsequently just knote_free() since the knote is barely
constructed, but that bypasses any logic that might release references
on owned files/fops. Defer clearing those until the knote actually owns
them and update the comment to draw the line more clearly.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/kern/kern_event.c | ||
|---|---|---|
| 1846 | What is the reference count the comment talks about? If it influx state, then it dropped at the end. If not, I really do not understand what is it. | |
| sys/kern/kern_event.c | ||
|---|---|---|
| 1846 | Reference counts on fp / fops; we should be holding a ref on each until this point, then we transfer ownership over to the knote for them to be taken care of by knote_drop*(). Maybe that exact wording instead: "We transfer ownership of fops/fp to the knote structure and avoid releasing them at the end of this routine now that all future paths will knote_drop(), which takes care of the reference counts we held on fops/fp above." (Whitespace change below dropped) | |
| sys/kern/kern_event.c | ||
|---|---|---|
| 1846 | Yes, I think this is much better. Existing text talks about 'reference counts to knote structure', which is simply confusing. | |