summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-04-24 15:46:36 +0200
committerChristian Brauner <brauner@kernel.org>2026-04-28 17:27:27 +0200
commit858c14b1f0a4aa3faebe1b9af757f20518ea78be (patch)
tree9e02ba6c0848d1671f7220d422867200faafb49a /drivers/phy/eswin/git@git.tavy.me:linux.git
parenta573cb40f9819c3fe81a43eb10170f8fc8eddc5e (diff)
eventpoll: document ep_clear_and_put() two-pass pattern
ep_clear_and_put() walks the rbtree twice: once to drain each epi's pwqlist, then again to ep_remove() each entry. The split is load-bearing -- fusing the passes into one loop would let a poll callback still queued on some epi_i fire after epi_{i+k} has already been freed -- but the previous comments described each pass in isolation and did not explain the ordering invariant or the cooperation with removal path C (eventpoll_release_file). Add a function-level docblock that labels this as path B from the top-of-file "Removal paths" section, names the two passes and the ordering invariant, explains the pwqlist drain as synchronization with in-flight ep_poll_callback() via whead->lock, describes the C-path hand-off when epi_fget() returns NULL, and states the ep->refcount invariant that keeps ep_remove()'s WARN_ON_ONCE safe across the loop. Also tighten the per-pass comments to one line each and fix the minor grammar bug in the poll_wait release comment ("these file" -> "poll-on-ep"). No functional change. Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org> Link: https://patch.msgid.link/20260424-work-epoll-rework-v1-5-249ed00a20f3@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions