diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index c641edf553a9..dea8a38bb2bb 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -562,6 +562,17 @@ void wait_on_page_bit(struct page *page, int bit_nr) | |||
562 | } | 562 | } |
563 | EXPORT_SYMBOL(wait_on_page_bit); | 563 | EXPORT_SYMBOL(wait_on_page_bit); |
564 | 564 | ||
565 | int wait_on_page_bit_killable(struct page *page, int bit_nr) | ||
566 | { | ||
567 | DEFINE_WAIT_BIT(wait, &page->flags, bit_nr); | ||
568 | |||
569 | if (!test_bit(bit_nr, &page->flags)) | ||
570 | return 0; | ||
571 | |||
572 | return __wait_on_bit(page_waitqueue(page), &wait, | ||
573 | sleep_on_page_killable, TASK_KILLABLE); | ||
574 | } | ||
575 | |||
565 | /** | 576 | /** |
566 | * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue | 577 | * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue |
567 | * @page: Page defining the wait queue of interest | 578 | * @page: Page defining the wait queue of interest |