Commit 7eb593e
bpf: dispatch to sleepable file dynptr
File dynptr reads may sleep when the requested folios are not in
the page cache. To avoid sleeping in non-sleepable contexts while still
supporting valid sleepable use, given that dynptrs are non-sleepable by
default, enable sleeping only when bpf_dynptr_from_file() is invoked
from a sleepable context.
This change:
* Introduces a sleepable constructor: bpf_dynptr_from_file_sleepable()
* Override non-sleepable constructor with sleepable if it's always
called in sleepable context
Signed-off-by: Mykyta Yatsenko <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>1 parent ef89f6b commit 7eb593e
3 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
673 | 676 | | |
674 | 677 | | |
675 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4336 | 4336 | | |
4337 | 4337 | | |
4338 | 4338 | | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
4339 | 4344 | | |
4340 | 4345 | | |
4341 | 4346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3127 | 3127 | | |
3128 | 3128 | | |
3129 | 3129 | | |
3130 | | - | |
| 3130 | + | |
| 3131 | + | |
3131 | 3132 | | |
3132 | 3133 | | |
3133 | 3134 | | |
| |||
21880 | 21881 | | |
21881 | 21882 | | |
21882 | 21883 | | |
21883 | | - | |
| 21884 | + | |
21884 | 21885 | | |
21885 | 21886 | | |
21886 | 21887 | | |
| |||
21916 | 21917 | | |
21917 | 21918 | | |
21918 | 21919 | | |
| 21920 | + | |
| 21921 | + | |
| 21922 | + | |
21919 | 21923 | | |
21920 | 21924 | | |
21921 | 21925 | | |
| |||
21969 | 21973 | | |
21970 | 21974 | | |
21971 | 21975 | | |
21972 | | - | |
| 21976 | + | |
21973 | 21977 | | |
21974 | 21978 | | |
21975 | 21979 | | |
| |||
0 commit comments