All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@163.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Vlastimil Babka <vbabka@suse.cz>, Jens Axboe <axboe@fb.com>,
	Tejun Heo <tj@kernel.org>
Cc: Geliang Tang <geliangtang@163.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH] mm: move lru_to_page to mm_inline.h
Date: Sat, 19 Dec 2015 17:08:27 +0800	[thread overview]
Message-ID: <db243314728321f435fb82dc2b5d99d98af409e2.1450515627.git.geliangtang@163.com> (raw)
In-Reply-To: <56744194.80809@suse.cz>

Move lru_to_page() from internal.h to mm_inline.h.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 include/linux/mm_inline.h | 2 ++
 mm/internal.h             | 2 --
 mm/readahead.c            | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index cf55945..712e8c3 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page)
 	return lru;
 }
 
+#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
+
 #endif
diff --git a/mm/internal.h b/mm/internal.h
index ca49922..5d8ec89 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -87,8 +87,6 @@ extern int isolate_lru_page(struct page *page);
 extern void putback_lru_page(struct page *page);
 extern bool zone_reclaimable(struct zone *zone);
 
-#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru))
-
 /*
  * in mm/rmap.c:
  */
diff --git a/mm/readahead.c b/mm/readahead.c
index 0aff760..20e58e8 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -17,6 +17,7 @@
 #include <linux/pagemap.h>
 #include <linux/syscalls.h>
 #include <linux/file.h>
+#include <linux/mm_inline.h>
 
 #include "internal.h"
 
-- 
2.5.0



WARNING: multiple messages have this Message-ID (diff)
From: Geliang Tang <geliangtang@163.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Vlastimil Babka <vbabka@suse.cz>, Jens Axboe <axboe@fb.com>,
	Tejun Heo <tj@kernel.org>
Cc: Geliang Tang <geliangtang@163.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH] mm: move lru_to_page to mm_inline.h
Date: Sat, 19 Dec 2015 17:08:27 +0800	[thread overview]
Message-ID: <db243314728321f435fb82dc2b5d99d98af409e2.1450515627.git.geliangtang@163.com> (raw)
In-Reply-To: <56744194.80809@suse.cz>

Move lru_to_page() from internal.h to mm_inline.h.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 include/linux/mm_inline.h | 2 ++
 mm/internal.h             | 2 --
 mm/readahead.c            | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index cf55945..712e8c3 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -100,4 +100,6 @@ static __always_inline enum lru_list page_lru(struct page *page)
 	return lru;
 }
 
+#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
+
 #endif
diff --git a/mm/internal.h b/mm/internal.h
index ca49922..5d8ec89 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -87,8 +87,6 @@ extern int isolate_lru_page(struct page *page);
 extern void putback_lru_page(struct page *page);
 extern bool zone_reclaimable(struct zone *zone);
 
-#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru))
-
 /*
  * in mm/rmap.c:
  */
diff --git a/mm/readahead.c b/mm/readahead.c
index 0aff760..20e58e8 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -17,6 +17,7 @@
 #include <linux/pagemap.h>
 #include <linux/syscalls.h>
 #include <linux/file.h>
+#include <linux/mm_inline.h>
 
 #include "internal.h"
 
-- 
2.5.0


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-12-19  9:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 14:40 [PATCH] mm/readahead.c, mm/vmscan.c: use lru_to_page instead of list_to_page Geliang Tang
2015-12-18 17:25 ` Vlastimil Babka
2015-12-18 17:25   ` Vlastimil Babka
2015-12-19  9:08   ` Geliang Tang [this message]
2015-12-19  9:08     ` [PATCH] mm: move lru_to_page to mm_inline.h Geliang Tang
2015-12-21 10:14     ` Vlastimil Babka
2015-12-21 10:14       ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db243314728321f435fb82dc2b5d99d98af409e2.1450515627.git.geliangtang@163.com \
    --to=geliangtang@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=tj@kernel.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.