Commit 3a4551e
committed
eventpoll: drop dead bool return from ep_remove_epi()
ep_remove_epi() always returns true -- the "can be disposed"
answer was meaningful back when the dying-check lived inside the
pre-split __ep_remove(), but after that check moved to ep_remove()
the return value is just noise. Both callers gate on it
unconditionally:
if (ep_remove_epi(ep, epi))
WARN_ON_ONCE(ep_refcount_dec_and_test(ep));
dispose = ep_remove_epi(ep, epi);
...
if (dispose && ep_refcount_dec_and_test(ep))
ep_free(ep);
Make ep_remove_epi() return void, drop the dispose local in
eventpoll_release_file(), and the useless conditionals at both
callers. No functional change.
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>1 parent 33e92e9 commit 3a4551e
1 file changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
| 885 | + | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
908 | 907 | | |
909 | 908 | | |
910 | 909 | | |
| |||
932 | 931 | | |
933 | 932 | | |
934 | 933 | | |
935 | | - | |
936 | | - | |
937 | | - | |
| 934 | + | |
| 935 | + | |
938 | 936 | | |
939 | 937 | | |
940 | 938 | | |
| |||
1126 | 1124 | | |
1127 | 1125 | | |
1128 | 1126 | | |
1129 | | - | |
1130 | 1127 | | |
1131 | 1128 | | |
1132 | 1129 | | |
| |||
1150 | 1147 | | |
1151 | 1148 | | |
1152 | 1149 | | |
1153 | | - | |
| 1150 | + | |
1154 | 1151 | | |
1155 | 1152 | | |
1156 | 1153 | | |
1157 | | - | |
| 1154 | + | |
1158 | 1155 | | |
1159 | 1156 | | |
1160 | 1157 | | |
| |||
0 commit comments