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_slow, so that __lock_page and __lock_page_slow can denote the versions which take a wait queue parameter. Signed-off-by: Suparna Bhattacharya Signed-off-by: Benjamin LaHaise diff -purN --exclude=description 71_wait_on_bit/include/linux/pagemap.h 72_lock_page_slow/include/linux/pagemap.h --- 71_wait_on_bit/include/linux/pagemap.h 2005-08-04 15:56:06.000000000 -0400 +++ 72_lock_page_slow/include/linux/pagemap.h 2005-08-08 17:15:54.000000000 -0400 @@ -159,14 +159,14 @@ 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_slow(struct page *page)); extern void FASTCALL(unlock_page(struct page *page)); static inline void lock_page(struct page *page) { might_sleep(); if (TestSetPageLocked(page)) - __lock_page(page); + lock_page_slow(page); } /* diff -purN --exclude=description 71_wait_on_bit/mm/filemap.c 72_lock_page_slow/mm/filemap.c --- 71_wait_on_bit/mm/filemap.c 2005-08-08 17:15:51.000000000 -0400 +++ 72_lock_page_slow/mm/filemap.c 2005-08-08 17:15:54.000000000 -0400 @@ -485,14 +485,14 @@ EXPORT_SYMBOL(end_page_writeback); * chances are that on the second loop, the block layer's plug list is empty, * so sync_page() will then return in state TASK_UNINTERRUPTIBLE. */ -void fastcall __lock_page(struct page *page) +void fastcall lock_page_slow(struct page *page) { DEFINE_WAIT_BIT(wait, &page->flags, PG_locked); __wait_on_bit_lock(page_waitqueue(page), &wait, sync_page, TASK_UNINTERRUPTIBLE); } -EXPORT_SYMBOL(__lock_page); +EXPORT_SYMBOL(lock_page_slow); /* * a rather lightweight function, finding and getting a reference to a