Re: [PATCH v2] zswap: do not crash the kernel on decompression failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 27, 2025 at 8:05 AM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
>
> On Thu, Feb 27, 2025 at 07:29:45AM +0000, Yosry Ahmed wrote:

I like this actually,

> I'd actually rather push those down into zeromap and zswap as well to
> follow that pattern more closely:
>
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 9b983de351f9..1fb5ce1884bd 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -538,6 +538,7 @@ static bool swap_read_folio_zeromap(struct folio *folio)
>
>         folio_zero_range(folio, 0, folio_size(folio));
>         folio_mark_uptodate(folio);

There should be another folio_unlock() above I think.

> +       folio_unlock(folio);
>         return true;
>  }
>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux