summaryrefslogtreecommitdiffstats
path: root/mm/zbud.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-14 18:22:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 14:40:52 -0500
commitf58fb5e7f0ab05c9083869c1ec27854af2afc7b7 (patch)
tree4590a58bdc4ef8b993e0232c9ce6d720678f24ee /mm/zbud.c
parente02d238c9852a91b30da9ea32ce36d1416cdc683 (diff)
mm/zbud.c: use list_last_entry() instead of list_tail_entry()
list_last_entry*( has been defined in list.h, so replace list_tail_entry() with it. Signed-off-by: Geliang Tang <geliangtang@163.com> Cc: Seth Jennings <sjennings@variantweb.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/zbud.c')
-rw-r--r--mm/zbud.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/zbud.c b/mm/zbud.c
index d8a181fd779b..b42322e50f63 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -463,9 +463,6 @@ void zbud_free(struct zbud_pool *pool, unsigned long handle)
463 spin_unlock(&pool->lock); 463 spin_unlock(&pool->lock);
464} 464}
465 465
466#define list_tail_entry(ptr, type, member) \
467 list_entry((ptr)->prev, type, member)
468
469/** 466/**
470 * zbud_reclaim_page() - evicts allocations from a pool page and frees it 467 * zbud_reclaim_page() - evicts allocations from a pool page and frees it
471 * @pool: pool from which a page will attempt to be evicted 468 * @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)
514 return -EINVAL; 511 return -EINVAL;
515 } 512 }
516 for (i = 0; i < retries; i++) { 513 for (i = 0; i < retries; i++) {
517 zhdr = list_tail_entry(&pool->lru, struct zbud_header, lru); 514 zhdr = list_last_entry(&pool->lru, struct zbud_header, lru);
518 list_del(&zhdr->lru); 515 list_del(&zhdr->lru);
519 list_del(&zhdr->buddy); 516 list_del(&zhdr->buddy);
520 /* Protect zbud page against free */ 517 /* Protect zbud page against free */