[PATCH v1 07/11] null_blk: zero page->private when freeing pages

Zi Yan ziy at nvidia.com
Mon Feb 23 14:26:37 AEDT 2026


This prepares for upcoming checks in page freeing path.

Signed-off-by: Zi Yan <ziy at nvidia.com>
Cc: Jens Axboe <axboe at kernel.dk>
Cc: Damien Le Moal <dlemoal at kernel.org>
Cc: Johannes Thumshirn <johannes.thumshirn at wdc.com>
Cc: linux-block at vger.kernel.org
---
 drivers/block/null_blk/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 740a8ac42075..86ea2644080f 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -886,6 +886,7 @@ static void null_free_page(struct nullb_page *t_page)
 	__set_bit(NULLB_PAGE_FREE, t_page->bitmap);
 	if (test_bit(NULLB_PAGE_LOCK, t_page->bitmap))
 		return;
+	set_page_private(t_page->page, 0);
 	__free_page(t_page->page);
 	kfree(t_page);
 }
-- 
2.51.0



More information about the Linux-erofs mailing list