[PATCH 08/15] mm/z3fold: use zpdesc free_pages_work

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

 



From: Alex Shi <alexs@xxxxxxxxxx>

The main purpose is converting page->private to zpdesc->zppage_flag.

Signed-off-by: Alex Shi <alexs@xxxxxxxxxx>
---
 mm/z3fold.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index afdf21024f83..97580e2224c2 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -501,14 +501,14 @@ static void free_pages_work(struct work_struct *w)
 	while (!list_empty(&pool->stale)) {
 		struct z3fold_header *zhdr = list_first_entry(&pool->stale,
 						struct z3fold_header, buddy);
-		struct page *page = virt_to_page(zhdr);
+		struct zpdesc *zpdesc = page_zpdesc(virt_to_page(zhdr));
 
 		list_del(&zhdr->buddy);
-		if (WARN_ON(!test_bit(PAGE_STALE, &page->private)))
+		if (WARN_ON(!test_bit(PAGE_STALE, &zpdesc->zppage_flag)))
 			continue;
 		spin_unlock(&pool->stale_lock);
 		cancel_work_sync(&zhdr->work);
-		free_z3fold_page(page, false);
+		free_z3fold_page(zpdesc_page(zpdesc), false);
 		cond_resched();
 		spin_lock(&pool->stale_lock);
 	}
-- 
2.43.0





[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