[<prev] [next>] [day] [month] [year] [list]
Message-Id: <f7f42c0639cbb745024809a31695969b98bd027b.1449063450.git.geliangtang@163.com>
Date: Wed, 2 Dec 2015 21:38:58 +0800
From: Geliang Tang <geliangtang@....com>
To: Seth Jennings <sjennings@...iantweb.net>
Cc: Geliang Tang <geliangtang@....com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] mm: zbud: use list_last_entry instead of list_tail_entry
list_last_entry has been defined in list.h, so I replace list_tail_entry
with it.
Signed-off-by: Geliang Tang <geliangtang@....com>
---
mm/zbud.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/mm/zbud.c b/mm/zbud.c
index d8a181f..b42322e 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -463,9 +463,6 @@ void zbud_free(struct zbud_pool *pool, unsigned long handle)
spin_unlock(&pool->lock);
}
-#define list_tail_entry(ptr, type, member) \
- list_entry((ptr)->prev, type, member)
-
/**
* zbud_reclaim_page() - evicts allocations from a pool page and frees it
* @pool: pool from which a page will attempt to be evicted
@@ -514,7 +511,7 @@ int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries)
return -EINVAL;
}
for (i = 0; i < retries; i++) {
- zhdr = list_tail_entry(&pool->lru, struct zbud_header, lru);
+ zhdr = list_last_entry(&pool->lru, struct zbud_header, lru);
list_del(&zhdr->lru);
list_del(&zhdr->buddy);
/* Protect zbud page against free */
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists