diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-09-25 07:20:13 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-25 07:20:13 -0700 |
| commit | dfdacf598759e7027914d50a77e8cd3a98bf7481 (patch) | |
| tree | fabac2560cc8a15934caef0372220861f86d2b43 /include/linux | |
| parent | 3da08d6c052734e186e835dc05ff9a33746c21e4 (diff) | |
[PATCH] use prepare_to_wait in VM/VFS
This uses the new wakeup machinery in some hot parts of the VFS and
block layers.
wait_on_buffer(), wait_on_page(), lock_page(), blk_congestion_wait().
Also in get_request_wait(), although the benefit for exclusive wakeups
will be lower.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pagemap.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 43390b2e2ef4..bfc986131fe6 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -74,9 +74,15 @@ static inline void ___add_to_page_cache(struct page *page, inc_page_state(nr_pagecache); } -extern void FASTCALL(lock_page(struct page *page)); +extern void FASTCALL(__lock_page(struct page *page)); extern void FASTCALL(unlock_page(struct page *page)); +static inline void lock_page(struct page *page) +{ + if (TestSetPageLocked(page)) + __lock_page(page); +} + /* * This is exported only for wait_on_page_locked/wait_on_page_writeback. * Never use this directly! |
