From: Suparna Bhattacharya In order to allow for interruptible and asynchronous versions of lock_page in conjunction with the wait_on_bit changes, we need to define low-level lock page routines which take an additional argument, i.e a wait queue entry and may return non-zero status, e.g -EINTR, -EIOCBRETRY, -EWOULDBLOCK etc. This patch renames __lock_page to lock_page_blocking, so that it can be later modified to denote a version which takes a wait queue parameter. Signed-off-by: Suparna Bhattacharya Acked-by: Ingo Molnar Signed-off-by: Andrew Morton --- include/linux/pagemap.h | 4 ++-- mm/filemap.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff -puN include/linux/pagemap.h~fsaio-rename-__lock_page-to-lock_page_blocking include/linux/pagemap.h --- a/include/linux/pagemap.h~fsaio-rename-__lock_page-to-lock_page_blocking +++ a/include/linux/pagemap.h @@ -142,7 +142,7 @@ static inline pgoff_t linear_page_index( return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT); } -extern void FASTCALL(__lock_page(struct page *page)); +extern void FASTCALL(lock_page_blocking(struct page *page)); extern void FASTCALL(unlock_page(struct page *page)); /* @@ -152,7 +152,7 @@ static inline void lock_page(struct page { might_sleep(); if (TestSetPageLocked(page)) - __lock_page(page); + lock_page_blocking(page); } /* diff -puN mm/filemap.c~fsaio-rename-__lock_page-to-lock_page_blocking mm/filemap.c --- a/mm/filemap.c~fsaio-rename-__lock_page-to-lock_page_blocking +++ a/mm/filemap.c @@ -520,17 +520,17 @@ void end_page_writeback(struct page *pag EXPORT_SYMBOL(end_page_writeback); /** - * __lock_page - get a lock on the page, assuming we need to sleep to get it + * lock_page_blocking - get a lock on the page, assuming we need to sleep to get it * @page: the page to lock */ -void fastcall __lock_page(struct page *page) +void fastcall lock_page_blocking(struct page *page) { DEFINE_WAIT_BIT(wait, &page->flags, PG_locked); __wait_on_bit_lock(page_waitqueue(page), &wait, sleep_on_page, TASK_UNINTERRUPTIBLE); } -EXPORT_SYMBOL(__lock_page); +EXPORT_SYMBOL(lock_page_blocking); /** * find_get_page - find and get a page reference @@ -575,7 +575,7 @@ repeat: page_cache_get(page); if (TestSetPageLocked(page)) { read_unlock_irq(&mapping->tree_lock); - __lock_page(page); + lock_page_blocking(page); read_lock_irq(&mapping->tree_lock); /* Has the page been truncated while we slept? */ _