Commit dcb3465
net: rose: split remove and free operations in rose_remove_neigh()
The current rose_remove_neigh() performs two distinct operations:
1. Removes rose_neigh from rose_neigh_list
2. Frees the rose_neigh structure
Split these operations into separate functions to improve maintainability
and prepare for upcoming refcount_t conversion. The timer cleanup remains
in rose_remove_neigh() because free operations can be called from timer
itself.
This patch introduce rose_neigh_put() to handle the freeing of rose_neigh
structures and modify rose_remove_neigh() to handle removal only.
Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250823085857.47674-2-takamitz@amazon.co.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 9448ccd commit dcb3465
2 files changed
+14
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
154 | 162 | | |
155 | 163 | | |
156 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | 237 | | |
242 | 238 | | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
246 | 242 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 243 | | |
252 | 244 | | |
253 | 245 | | |
| |||
331 | 323 | | |
332 | 324 | | |
333 | 325 | | |
334 | | - | |
| 326 | + | |
335 | 327 | | |
| 328 | + | |
| 329 | + | |
336 | 330 | | |
337 | 331 | | |
338 | 332 | | |
| |||
513 | 507 | | |
514 | 508 | | |
515 | 509 | | |
| 510 | + | |
516 | 511 | | |
517 | 512 | | |
518 | 513 | | |
| |||
569 | 564 | | |
570 | 565 | | |
571 | 566 | | |
| 567 | + | |
572 | 568 | | |
573 | 569 | | |
574 | 570 | | |
| |||
1301 | 1297 | | |
1302 | 1298 | | |
1303 | 1299 | | |
| 1300 | + | |
1304 | 1301 | | |
1305 | 1302 | | |
1306 | 1303 | | |
| |||
0 commit comments