Commit 145f820
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 6504661 commit 145f820
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 | | |
| |||
21898 | 21899 | | |
21899 | 21900 | | |
21900 | 21901 | | |
21901 | | - | |
| 21902 | + | |
21902 | 21903 | | |
21903 | 21904 | | |
21904 | 21905 | | |
| |||
21934 | 21935 | | |
21935 | 21936 | | |
21936 | 21937 | | |
| 21938 | + | |
| 21939 | + | |
| 21940 | + | |
21937 | 21941 | | |
21938 | 21942 | | |
21939 | 21943 | | |
| |||
21987 | 21991 | | |
21988 | 21992 | | |
21989 | 21993 | | |
21990 | | - | |
| 21994 | + | |
21991 | 21995 | | |
21992 | 21996 | | |
21993 | 21997 | | |
| |||
0 commit comments