Commit 2e3c251
btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()
This function needs some extra checks on locked pages and eb. For error
handling we need to unlock locked pages and the eb.
There is a rare >0 return value branch, where all pages get locked
while write bio is not flushed.
Thankfully it's handled by the only caller, btree_write_cache_pages(),
as later write_one_eb() call will trigger submit_one_bio(). So there
shouldn't be any problem.
Signed-off-by: Qu Wenruo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent 02c6db4 commit 2e3c251
1 file changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3492 | 3492 | | |
3493 | 3493 | | |
3494 | 3494 | | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
3495 | 3502 | | |
3496 | 3503 | | |
3497 | 3504 | | |
3498 | 3505 | | |
3499 | 3506 | | |
3500 | | - | |
| 3507 | + | |
3501 | 3508 | | |
3502 | 3509 | | |
3503 | 3510 | | |
3504 | 3511 | | |
3505 | | - | |
3506 | 3512 | | |
3507 | | - | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
3508 | 3516 | | |
3509 | 3517 | | |
3510 | 3518 | | |
| |||
3514 | 3522 | | |
3515 | 3523 | | |
3516 | 3524 | | |
3517 | | - | |
| 3525 | + | |
| 3526 | + | |
3518 | 3527 | | |
3519 | 3528 | | |
3520 | 3529 | | |
| |||
3556 | 3565 | | |
3557 | 3566 | | |
3558 | 3567 | | |
3559 | | - | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
3560 | 3572 | | |
3561 | 3573 | | |
3562 | 3574 | | |
3563 | 3575 | | |
3564 | 3576 | | |
3565 | 3577 | | |
3566 | 3578 | | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
3567 | 3584 | | |
3568 | 3585 | | |
3569 | 3586 | | |
| |||
0 commit comments