Commit a5e26f4
io_uring/napi: improve __io_napi_add
1. move the sock->sk pointer validity test outside the function to
avoid the function call overhead and to make the function more
more reusable
2. change its name to __io_napi_add_id to be more precise about it is
doing
3. return an error code to report errors
Signed-off-by: Olivier Langlois <[email protected]>
Link: https://lore.kernel.org/r/d637fa3b437d753c0f4e44ff6a7b5bf2c2611270.1728828877.git.olivier@trillion01.com
Signed-off-by: Jens Axboe <[email protected]>1 parent 45b3941 commit a5e26f4
2 files changed
+9
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | 44 | | |
47 | 45 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 46 | | |
55 | 47 | | |
56 | | - | |
| 48 | + | |
57 | 49 | | |
58 | 50 | | |
59 | 51 | | |
| |||
62 | 54 | | |
63 | 55 | | |
64 | 56 | | |
65 | | - | |
| 57 | + | |
66 | 58 | | |
67 | 59 | | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
71 | | - | |
| 63 | + | |
72 | 64 | | |
73 | 65 | | |
74 | 66 | | |
| |||
77 | 69 | | |
78 | 70 | | |
79 | 71 | | |
80 | | - | |
| 72 | + | |
81 | 73 | | |
82 | 74 | | |
83 | 75 | | |
84 | 76 | | |
85 | 77 | | |
| 78 | + | |
86 | 79 | | |
87 | 80 | | |
88 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments