Commit 72c9865
btrfs-progs: improve error handling in btrfs_split_item()
This involves the following error cases:
- Unable to find the original item
Return -EAGAIN and release the path (which is not done in the original
code)
- Error from split_leaf()
Remove the BUG_ON() and handle the error.
The most common error is ENOSPC.
- Error from kmalloc()
Just handle the error and return -ENOMEM.
Issue: #312
Signed-off-by: Qu Wenruo <wqu@suse.com>1 parent 4141831 commit 72c9865
File tree
1 file changed
+13
-4
lines changed1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2450 | 2450 | | |
2451 | 2451 | | |
2452 | 2452 | | |
2453 | | - | |
| 2453 | + | |
2454 | 2454 | | |
2455 | 2455 | | |
2456 | 2456 | | |
| |||
2469 | 2469 | | |
2470 | 2470 | | |
2471 | 2471 | | |
2472 | | - | |
| 2472 | + | |
| 2473 | + | |
2473 | 2474 | | |
2474 | 2475 | | |
2475 | 2476 | | |
2476 | | - | |
| 2477 | + | |
| 2478 | + | |
2477 | 2479 | | |
2478 | 2480 | | |
2479 | 2481 | | |
| |||
2484 | 2486 | | |
2485 | 2487 | | |
2486 | 2488 | | |
2487 | | - | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
2488 | 2493 | | |
2489 | 2494 | | |
2490 | 2495 | | |
| |||
2530 | 2535 | | |
2531 | 2536 | | |
2532 | 2537 | | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
2533 | 2542 | | |
2534 | 2543 | | |
2535 | 2544 | | |
| |||
0 commit comments