[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200225102300.23895-2-sjpark@amazon.com>
Date: Tue, 25 Feb 2020 11:22:54 +0100
From: SeongJae Park <sjpark@...zon.com>
To: <akpm@...ux-foundation.org>
CC: SeongJae Park <sjpark@...zon.de>, <aarcange@...hat.com>,
<acme@...nel.org>, <alexander.shishkin@...ux.intel.com>,
<amit@...nel.org>, <brendan.d.gregg@...il.com>,
<brendanhiggins@...gle.com>, <cai@....pw>,
<colin.king@...onical.com>, <corbet@....net>, <dwmw@...zon.com>,
<jolsa@...hat.com>, <kirill@...temov.name>, <mark.rutland@....com>,
<mgorman@...e.de>, <minchan@...nel.org>, <mingo@...hat.com>,
<namhyung@...nel.org>, <peterz@...radead.org>,
<rdunlap@...radead.org>, <rientjes@...gle.com>,
<rostedt@...dmis.org>, <shuah@...nel.org>, <sj38.park@...il.com>,
<vbabka@...e.cz>, <vdavydov.dev@...il.com>,
<yang.shi@...ux.alibaba.com>, <ying.huang@...el.com>,
<linux-mm@...ck.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [RFC v3 1/7] mm/madvise: Export madvise_common() to mm internal code
From: SeongJae Park <sjpark@...zon.de>
This commit exports ``madvise_common()`` to ``mm/`` code for future
reuse.
Signed-off-by: SeongJae Park <sjpark@...zon.de>
---
mm/internal.h | 4 ++++
mm/madvise.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/mm/internal.h b/mm/internal.h
index 3cf20ab3ca01..dcdfe00e02ff 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -576,4 +576,8 @@ static inline bool is_migrate_highatomic_page(struct page *page)
void setup_zone_pageset(struct zone *zone);
extern struct page *alloc_new_node_page(struct page *page, unsigned long node);
+
+
+int madvise_common(struct task_struct *task, struct mm_struct *mm,
+ unsigned long start, size_t len_in, int behavior);
#endif /* __MM_INTERNAL_H */
diff --git a/mm/madvise.c b/mm/madvise.c
index 0c901de531e4..4fa9dfc770bc 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -1005,7 +1005,7 @@ madvise_behavior_valid(int behavior)
* @task could be a zombie leader if it calls sys_exit so accessing mm_struct
* via task->mm is prohibited. Please use @mm instead of task->mm.
*/
-static int madvise_common(struct task_struct *task, struct mm_struct *mm,
+int madvise_common(struct task_struct *task, struct mm_struct *mm,
unsigned long start, size_t len_in, int behavior)
{
unsigned long end, tmp;
@@ -1103,6 +1103,7 @@ static int madvise_common(struct task_struct *task, struct mm_struct *mm,
return error;
}
+EXPORT_SYMBOL_GPL(madvise_common);
/*
* The madvise(2) system call.
--
2.17.1
Powered by blists - more mailing lists