diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-02-22 18:44:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 19:41:29 -0500 |
commit | 74d81bfae8e3f52e956367f6ed764db269b87091 (patch) | |
tree | 0d0ad67843aaa09e97b8357d356c98f9fbb3606e | |
parent | d94e0c05eba9ed627ce467a7c3e92b365269f905 (diff) |
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 a4796e37c12e ("MM: export page_wakeup functions").
Link: http://lkml.kernel.org/r/20170103182234.30141-3-npiggin@gmail.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/pagemap.h | 12 | ||||
-rw-r--r-- | mm/filemap.c | 10 |
2 files changed, 10 insertions, 12 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 324c8dbad1e1..b572f5530392 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -482,19 +482,11 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, | |||
482 | } | 482 | } |
483 | 483 | ||
484 | /* | 484 | /* |
485 | * This is exported only for wait_on_page_locked/wait_on_page_writeback, | 485 | * This is exported only for wait_on_page_locked/wait_on_page_writeback, etc., |
486 | * and for filesystems which need to wait on PG_private. | 486 | * and should not be used directly. |
487 | */ | 487 | */ |
488 | extern void wait_on_page_bit(struct page *page, int bit_nr); | 488 | extern void wait_on_page_bit(struct page *page, int bit_nr); |
489 | extern int wait_on_page_bit_killable(struct page *page, int bit_nr); | 489 | extern int wait_on_page_bit_killable(struct page *page, int bit_nr); |
490 | extern void wake_up_page_bit(struct page *page, int bit_nr); | ||
491 | |||
492 | static inline void wake_up_page(struct page *page, int bit) | ||
493 | { | ||
494 | if (!PageWaiters(page)) | ||
495 | return; | ||
496 | wake_up_page_bit(page, bit); | ||
497 | } | ||
498 | 490 | ||
499 | /* | 491 | /* |
500 | * Wait for a page to be unlocked. | 492 | * Wait for a page to be unlocked. |
diff --git a/mm/filemap.c b/mm/filemap.c index 3f9afded581b..a3dbe9eff213 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -788,7 +788,7 @@ static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void | |||
788 | return autoremove_wake_function(wait, mode, sync, key); | 788 | return autoremove_wake_function(wait, mode, sync, key); |
789 | } | 789 | } |
790 | 790 | ||
791 | void wake_up_page_bit(struct page *page, int bit_nr) | 791 | static void wake_up_page_bit(struct page *page, int bit_nr) |
792 | { | 792 | { |
793 | wait_queue_head_t *q = page_waitqueue(page); | 793 | wait_queue_head_t *q = page_waitqueue(page); |
794 | struct wait_page_key key; | 794 | struct wait_page_key key; |
@@ -821,7 +821,13 @@ void wake_up_page_bit(struct page *page, int bit_nr) | |||
821 | } | 821 | } |
822 | spin_unlock_irqrestore(&q->lock, flags); | 822 | spin_unlock_irqrestore(&q->lock, flags); |
823 | } | 823 | } |
824 | EXPORT_SYMBOL(wake_up_page_bit); | 824 | |
825 | static void wake_up_page(struct page *page, int bit) | ||
826 | { | ||
827 | if (!PageWaiters(page)) | ||
828 | return; | ||
829 | wake_up_page_bit(page, bit); | ||
830 | } | ||
825 | 831 | ||
826 | static inline int wait_on_page_bit_common(wait_queue_head_t *q, | 832 | static inline int wait_on_page_bit_common(wait_queue_head_t *q, |
827 | struct page *page, int bit_nr, int state, bool lock) | 833 | struct page *page, int bit_nr, int state, bool lock) |