diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 126d3973b3d1..2e2d38ebda4b 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -513,6 +513,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | |||
513 | } | 513 | } |
514 | return ret; | 514 | return ret; |
515 | } | 515 | } |
516 | EXPORT_SYMBOL_GPL(add_to_page_cache_lru); | ||
516 | 517 | ||
517 | #ifdef CONFIG_NUMA | 518 | #ifdef CONFIG_NUMA |
518 | struct page *__page_cache_alloc(gfp_t gfp) | 519 | struct page *__page_cache_alloc(gfp_t gfp) |
@@ -565,6 +566,24 @@ void wait_on_page_bit(struct page *page, int bit_nr) | |||
565 | EXPORT_SYMBOL(wait_on_page_bit); | 566 | EXPORT_SYMBOL(wait_on_page_bit); |
566 | 567 | ||
567 | /** | 568 | /** |
569 | * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue | ||
570 | * @page - Page defining the wait queue of interest | ||
571 | * @waiter - Waiter to add to the queue | ||
572 | * | ||
573 | * Add an arbitrary @waiter to the wait queue for the nominated @page. | ||
574 | */ | ||
575 | void add_page_wait_queue(struct page *page, wait_queue_t *waiter) | ||
576 | { | ||
577 | wait_queue_head_t *q = page_waitqueue(page); | ||
578 | unsigned long flags; | ||
579 | |||
580 | spin_lock_irqsave(&q->lock, flags); | ||
581 | __add_wait_queue(q, waiter); | ||
582 | spin_unlock_irqrestore(&q->lock, flags); | ||
583 | } | ||
584 | EXPORT_SYMBOL_GPL(add_page_wait_queue); | ||
585 | |||
586 | /** | ||
568 | * unlock_page - unlock a locked page | 587 | * unlock_page - unlock a locked page |
569 | * @page: the page | 588 | * @page: the page |
570 | * | 589 | * |
@@ -627,6 +646,7 @@ int __lock_page_killable(struct page *page) | |||
627 | return __wait_on_bit_lock(page_waitqueue(page), &wait, | 646 | return __wait_on_bit_lock(page_waitqueue(page), &wait, |
628 | sync_page_killable, TASK_KILLABLE); | 647 | sync_page_killable, TASK_KILLABLE); |
629 | } | 648 | } |
649 | EXPORT_SYMBOL_GPL(__lock_page_killable); | ||
630 | 650 | ||
631 | /** | 651 | /** |
632 | * __lock_page_nosync - get a lock on the page, without calling sync_page() | 652 | * __lock_page_nosync - get a lock on the page, without calling sync_page() |
@@ -2463,6 +2483,9 @@ EXPORT_SYMBOL(generic_file_aio_write); | |||
2463 | * (presumably at page->private). If the release was successful, return `1'. | 2483 | * (presumably at page->private). If the release was successful, return `1'. |
2464 | * Otherwise return zero. | 2484 | * Otherwise return zero. |
2465 | * | 2485 | * |
2486 | * This may also be called if PG_fscache is set on a page, indicating that the | ||
2487 | * page is known to the local caching routines. | ||
2488 | * | ||
2466 | * The @gfp_mask argument specifies whether I/O may be performed to release | 2489 | * The @gfp_mask argument specifies whether I/O may be performed to release |
2467 | * this page (__GFP_IO), and whether the call may block (__GFP_WAIT & __GFP_FS). | 2490 | * this page (__GFP_IO), and whether the call may block (__GFP_WAIT & __GFP_FS). |
2468 | * | 2491 | * |