Commit 2933ae6
io_uring/rsrc: refactor io_rsrc_node_switch
We use io_rsrc_node_switch() coupled with io_rsrc_node_switch_start()
for a bunch of cases including initialising ctx->rsrc_node, i.e. by
passing NULL instead of rsrc_data. Leave it to only deal with actual
node changing.
For that, first remove it from io_uring_create() and add a function
allocating the first node. Then also remove all calls to
io_rsrc_node_switch() from files/buffers register as we already have a
node installed and it does essentially nothing.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d146fe306ff98b1a5a60c997c252534f03d423d7.1681210788.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 13c2239 commit 2933ae6
3 files changed
Lines changed: 20 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3881 | 3881 | | |
3882 | 3882 | | |
3883 | 3883 | | |
3884 | | - | |
3885 | | - | |
| 3884 | + | |
| 3885 | + | |
3886 | 3886 | | |
3887 | 3887 | | |
3888 | | - | |
3889 | 3888 | | |
3890 | 3889 | | |
3891 | 3890 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
| 234 | + | |
| 235 | + | |
236 | 236 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 237 | + | |
| 238 | + | |
248 | 239 | | |
249 | | - | |
250 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
251 | 246 | | |
252 | 247 | | |
253 | 248 | | |
| |||
921 | 916 | | |
922 | 917 | | |
923 | 918 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | 919 | | |
928 | 920 | | |
929 | 921 | | |
| |||
978 | 970 | | |
979 | 971 | | |
980 | 972 | | |
981 | | - | |
982 | 973 | | |
983 | 974 | | |
984 | 975 | | |
| |||
1260 | 1251 | | |
1261 | 1252 | | |
1262 | 1253 | | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | 1254 | | |
1267 | 1255 | | |
1268 | 1256 | | |
| |||
1300 | 1288 | | |
1301 | 1289 | | |
1302 | 1290 | | |
1303 | | - | |
1304 | | - | |
1305 | 1291 | | |
1306 | 1292 | | |
1307 | 1293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
167 | 174 | | |
168 | 175 | | |
169 | 176 | | |
| |||
0 commit comments