Commit 74d81bfa authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Linus Torvalds

mm: un-export wake_up_page functions

These are no longer used outside mm/filemap.c, so un-export them and
make them static where possible.  These were exported specifically for
NFS use in commit a4796e37 ("MM: export page_wakeup functions").

Link: http://lkml.kernel.org/r/20170103182234.30141-3-npiggin@gmail.comSigned-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d94e0c05
...@@ -482,19 +482,11 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, ...@@ -482,19 +482,11 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
} }
/* /*
* This is exported only for wait_on_page_locked/wait_on_page_writeback, * This is exported only for wait_on_page_locked/wait_on_page_writeback, etc.,
* and for filesystems which need to wait on PG_private. * and should not be used directly.
*/ */
extern void wait_on_page_bit(struct page *page, int bit_nr); extern void wait_on_page_bit(struct page *page, int bit_nr);
extern int wait_on_page_bit_killable(struct page *page, int bit_nr); extern int wait_on_page_bit_killable(struct page *page, int bit_nr);
extern void wake_up_page_bit(struct page *page, int bit_nr);
static inline void wake_up_page(struct page *page, int bit)
{
if (!PageWaiters(page))
return;
wake_up_page_bit(page, bit);
}
/* /*
* Wait for a page to be unlocked. * Wait for a page to be unlocked.
......
...@@ -788,7 +788,7 @@ static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void ...@@ -788,7 +788,7 @@ static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void
return autoremove_wake_function(wait, mode, sync, key); return autoremove_wake_function(wait, mode, sync, key);
} }
void wake_up_page_bit(struct page *page, int bit_nr) static void wake_up_page_bit(struct page *page, int bit_nr)
{ {
wait_queue_head_t *q = page_waitqueue(page); wait_queue_head_t *q = page_waitqueue(page);
struct wait_page_key key; struct wait_page_key key;
...@@ -821,7 +821,13 @@ void wake_up_page_bit(struct page *page, int bit_nr) ...@@ -821,7 +821,13 @@ void wake_up_page_bit(struct page *page, int bit_nr)
} }
spin_unlock_irqrestore(&q->lock, flags); spin_unlock_irqrestore(&q->lock, flags);
} }
EXPORT_SYMBOL(wake_up_page_bit);
static void wake_up_page(struct page *page, int bit)
{
if (!PageWaiters(page))
return;
wake_up_page_bit(page, bit);
}
static inline int wait_on_page_bit_common(wait_queue_head_t *q, static inline int wait_on_page_bit_common(wait_queue_head_t *q,
struct page *page, int bit_nr, int state, bool lock) struct page *page, int bit_nr, int state, bool lock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment