Commit 922a2c7
committed
io_uring/rsrc: cleanup io_pin_pages()
This function is overly convoluted with a goto error path, and checks
under the mmap_read_lock() that don't need to be at all. Rearrange it
a bit so the checks and errors fall out naturally, rather than needing
to jump around for it.
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 93b8cc6 commit 922a2c7
1 file changed
Lines changed: 17 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | | - | |
| 1040 | + | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
| 1045 | + | |
1045 | 1046 | | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | | - | |
| 1049 | + | |
1049 | 1050 | | |
1050 | | - | |
1051 | 1051 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1055 | 1057 | | |
1056 | | - | |
1057 | | - | |
| 1058 | + | |
| 1059 | + | |
1058 | 1060 | | |
1059 | | - | |
1060 | | - | |
| 1061 | + | |
| 1062 | + | |
1061 | 1063 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1071 | 1067 | | |
1072 | | - | |
| 1068 | + | |
| 1069 | + | |
1073 | 1070 | | |
1074 | 1071 | | |
1075 | 1072 | | |
| |||
0 commit comments