[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250306222453.1269456-1-nphamcs@gmail.com>
Date: Thu, 6 Mar 2025 14:24:53 -0800
From: Nhat Pham <nphamcs@...il.com>
To: akpm@...ux-foundation.org
Cc: hannes@...xchg.org,
yosryahmed@...gle.com,
yosry.ahmed@...ux.dev,
chengming.zhou@...ux.dev,
linux-mm@...ck.org,
kernel-team@...a.com,
linux-kernel@...r.kernel.org
Subject: [PATCH v4] page_io: zswap: do not crash the kernel on decompression failure (fix)
Fix the documentation of zswap_load() - should say load a folio (rather
than a page), and should be explicit that the folio is unlocked and
marked up-to-date in the success case.
Suggested-by: Yosry Ahmed <yosry.ahmed@...ux.dev>
Signed-off-by: Nhat Pham <nphamcs@...il.com>
---
mm/zswap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/zswap.c b/mm/zswap.c
index 799b22c19b5e..c470073c17cc 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -1629,10 +1629,11 @@ bool zswap_store(struct folio *folio)
}
/**
- * zswap_load() - load a page from zswap
+ * zswap_load() - load a folio from zswap
* @folio: folio to load
*
- * Return: 0 on success, or one of the following error codes:
+ * Return: 0 on success, with the folio unlocked and marked up-to-date, or one
+ * of the following error codes:
*
* -EIO: if the swapped out content was in zswap, but could not be loaded
* into the page due to a decompression failure. The folio is unlocked, but
--
2.43.5
Powered by blists - more mailing lists