Skip to content

Commit 74d81bf

Browse files
npiggintorvalds
authored andcommitted
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 a4796e3 ("MM: export page_wakeup functions"). Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Nicholas Piggin <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Anna Schumaker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d94e0c0 commit 74d81bf

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

include/linux/pagemap.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -482,19 +482,11 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
482482
}
483483

484484
/*
485-
* This is exported only for wait_on_page_locked/wait_on_page_writeback,
486-
* and for filesystems which need to wait on PG_private.
485+
* This is exported only for wait_on_page_locked/wait_on_page_writeback, etc.,
486+
* and should not be used directly.
487487
*/
488488
extern void wait_on_page_bit(struct page *page, int bit_nr);
489489
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-
}
498490

499491
/*
500492
* Wait for a page to be unlocked.

mm/filemap.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void
788788
return autoremove_wake_function(wait, mode, sync, key);
789789
}
790790

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)
792792
{
793793
wait_queue_head_t *q = page_waitqueue(page);
794794
struct wait_page_key key;
@@ -821,7 +821,13 @@ void wake_up_page_bit(struct page *page, int bit_nr)
821821
}
822822
spin_unlock_irqrestore(&q->lock, flags);
823823
}
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+
}
825831

826832
static inline int wait_on_page_bit_common(wait_queue_head_t *q,
827833
struct page *page, int bit_nr, int state, bool lock)

0 commit comments

Comments
 (0)