diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-04-24 15:46:37 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-04-28 17:27:27 +0200 |
| commit | 31c95f087e5df2c508f0f52d13d42f44d78c6510 (patch) | |
| tree | c2d05ce103e36e635a4fbb5d85bfc9c023c38b5b /drivers/phy/eswin/git@git.tavy.me:linux.git | |
| parent | 858c14b1f0a4aa3faebe1b9af757f20518ea78be (diff) | |
eventpoll: rename ep_refcount_dec_and_test() to ep_put()
ep_refcount_dec_and_test() mirrors refcount_dec_and_test() verbatim,
which reads fine at a call site like
if (ep_refcount_dec_and_test(ep))
ep_free(ep);
but awkward at
WARN_ON_ONCE(ep_refcount_dec_and_test(ep));
and does not pair cleanly with ep_get(). Rename to the idiomatic
ep_put() and reword the kerneldoc to spell out the return-value
contract (caller is responsible for ep_free() iff the return is
true). Leave ep_put() as a bool-returning wrapper -- we cannot fold
ep_free() into it because ep_remove() calls it under ep->mtx and the
mutex would still be held when ep_free()'s mutex_destroy() ran (see
commit 8c2e52ebbe88 "eventpoll: don't decrement ep refcount while
still holding the ep mutex").
No functional change.
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Link: https://patch.msgid.link/20260424-work-epoll-rework-v1-6-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
