Commit d0b51bf
committed
Revert "mm: shmem: don't truncate page if memory failure happens"
This reverts commit b9d02f1.
The error handling of that patch was fundamentally broken, and it needs
to be entirely re-done.
For example, in shmem_write_begin() it would call shmem_getpage(), then
ignore the error return from that, and look at the page pointer contents
instead.
And in shmem_read_mapping_page_gfp(), the patch tested PageHWPoison() on
a page pointer that two lines earlier had potentially been set as an
error pointer.
These issues could be individually fixed, but when it has this many
issues, I'm just reverting it instead of waiting for fixes.
Link: https://lore.kernel.org/linux-mm/20211111084617.6746-1-ajaygargnsit@gmail.com/
Reported-by: Ajay Garg <ajaygargnsit@gmail.com>
Reported-by: Jens Axboe <axboe@kernel.dk>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent a613224 commit d0b51bf
3 files changed
Lines changed: 6 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
868 | 867 | | |
869 | 868 | | |
870 | 869 | | |
871 | | - | |
872 | 870 | | |
873 | 871 | | |
874 | 872 | | |
| |||
897 | 895 | | |
898 | 896 | | |
899 | 897 | | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | 898 | | |
907 | 899 | | |
908 | 900 | | |
909 | 901 | | |
910 | 902 | | |
911 | 903 | | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | 904 | | |
916 | 905 | | |
917 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
918 | 910 | | |
919 | 911 | | |
920 | 912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2456 | 2456 | | |
2457 | 2457 | | |
2458 | 2458 | | |
2459 | | - | |
2460 | 2459 | | |
2461 | 2460 | | |
2462 | 2461 | | |
| |||
2467 | 2466 | | |
2468 | 2467 | | |
2469 | 2468 | | |
2470 | | - | |
2471 | | - | |
2472 | | - | |
2473 | | - | |
2474 | | - | |
2475 | | - | |
2476 | | - | |
2477 | | - | |
2478 | | - | |
| 2469 | + | |
2479 | 2470 | | |
2480 | 2471 | | |
2481 | 2472 | | |
| |||
2562 | 2553 | | |
2563 | 2554 | | |
2564 | 2555 | | |
2565 | | - | |
2566 | | - | |
2567 | | - | |
2568 | | - | |
2569 | | - | |
2570 | | - | |
2571 | 2556 | | |
2572 | 2557 | | |
2573 | 2558 | | |
| |||
3107 | 3092 | | |
3108 | 3093 | | |
3109 | 3094 | | |
3110 | | - | |
3111 | | - | |
| 3095 | + | |
3112 | 3096 | | |
3113 | 3097 | | |
3114 | 3098 | | |
3115 | 3099 | | |
3116 | 3100 | | |
3117 | 3101 | | |
3118 | 3102 | | |
3119 | | - | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | 3103 | | |
3125 | 3104 | | |
3126 | 3105 | | |
| |||
3771 | 3750 | | |
3772 | 3751 | | |
3773 | 3752 | | |
3774 | | - | |
3775 | | - | |
3776 | | - | |
3777 | | - | |
3778 | | - | |
3779 | | - | |
3780 | | - | |
3781 | 3753 | | |
3782 | 3754 | | |
3783 | 3755 | | |
| |||
3788 | 3760 | | |
3789 | 3761 | | |
3790 | 3762 | | |
3791 | | - | |
| 3763 | + | |
3792 | 3764 | | |
3793 | 3765 | | |
3794 | 3766 | | |
| |||
4199 | 4171 | | |
4200 | 4172 | | |
4201 | 4173 | | |
4202 | | - | |
4203 | | - | |
4204 | | - | |
4205 | | - | |
4206 | 4174 | | |
4207 | 4175 | | |
4208 | 4176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 235 | | |
241 | 236 | | |
242 | 237 | | |
| |||
0 commit comments