Commit 1e9d62d
ext4: optimize ea_inode block expansion
Copy ea data from inode entry when expanding ea block if possible.
Then remove the ea entry if expansion success. Thus memcpy to a
temporary buffer may be avoided.
If the expansion fails, we do not need to recovery the removed ea
entry neither in this way.
Reported-by: syzbot+2dacb8f015bf1420155f@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?id=3613786cb88c93aa1c6a279b1df6a7b201347d08
Link: https://lore.kernel.org/r/20230103014517.495275-2-jun.nie@linaro.org
Cc: stable@kernel.org
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 08abd04 commit 1e9d62d
1 file changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2600 | 2600 | | |
2601 | 2601 | | |
2602 | 2602 | | |
2603 | | - | |
2604 | 2603 | | |
2605 | | - | |
| 2604 | + | |
2606 | 2605 | | |
2607 | 2606 | | |
2608 | 2607 | | |
| |||
2614 | 2613 | | |
2615 | 2614 | | |
2616 | 2615 | | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
2617 | 2622 | | |
2618 | 2623 | | |
2619 | 2624 | | |
2620 | 2625 | | |
2621 | 2626 | | |
2622 | | - | |
| 2627 | + | |
2623 | 2628 | | |
2624 | 2629 | | |
2625 | 2630 | | |
| |||
2634 | 2639 | | |
2635 | 2640 | | |
2636 | 2641 | | |
2637 | | - | |
2638 | | - | |
2639 | | - | |
2640 | | - | |
2641 | | - | |
2642 | 2642 | | |
2643 | 2643 | | |
2644 | 2644 | | |
2645 | 2645 | | |
2646 | 2646 | | |
2647 | 2647 | | |
2648 | | - | |
| 2648 | + | |
2649 | 2649 | | |
2650 | 2650 | | |
2651 | 2651 | | |
2652 | | - | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
2653 | 2658 | | |
2654 | 2659 | | |
2655 | | - | |
| 2660 | + | |
| 2661 | + | |
2656 | 2662 | | |
2657 | 2663 | | |
2658 | 2664 | | |
| |||
0 commit comments