Commit 0abed7c
committed
mm: never attempt async page lock if we've transferred data already
We catch the case where we enter generic_file_buffered_read() with data
already transferred, but we also need to be careful not to allow an async
page lock if we're looping transferring data. If not, we could be
returning -EIOCBQUEUED instead of the transferred amount, and it could
result in double waitqueue additions as well.
Cc: stable@vger.kernel.org # v5.9
Fixes: 1a0a785 ("mm: support async buffered reads in generic_file_buffered_read()")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 944d144 commit 0abed7c
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2347 | 2347 | | |
2348 | 2348 | | |
2349 | 2349 | | |
2350 | | - | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
2351 | 2355 | | |
2352 | | - | |
| 2356 | + | |
2353 | 2357 | | |
| 2358 | + | |
2354 | 2359 | | |
2355 | 2360 | | |
2356 | 2361 | | |
| |||
2393 | 2398 | | |
2394 | 2399 | | |
2395 | 2400 | | |
2396 | | - | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
2397 | 2406 | | |
2398 | | - | |
| 2407 | + | |
2399 | 2408 | | |
| 2409 | + | |
2400 | 2410 | | |
2401 | 2411 | | |
2402 | 2412 | | |
| |||
0 commit comments