aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pagemap.h
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2011-05-24 20:11:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 11:39:08 -0400
commitf62e00cc3a00bfbd394a79fc22b334c31f91bd5f (patch)
tree29e0a3ac793e4a5a15bbbe4b4945470a41e820e7 /include/linux/pagemap.h
parentfa25c503dfa203b921199ea42c0046c89f2ed49f (diff)
mm: introduce wait_on_page_locked_killable()
commit 2687a356 ("Add lock_page_killable") introduced killable lock_page(). Similarly this patch introdues killable wait_on_page_locked(). Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r--include/linux/pagemap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index c1195065264..ea268080380 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -357,6 +357,15 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
357 */ 357 */
358extern void wait_on_page_bit(struct page *page, int bit_nr); 358extern void wait_on_page_bit(struct page *page, int bit_nr);
359 359
360extern int wait_on_page_bit_killable(struct page *page, int bit_nr);
361
362static inline int wait_on_page_locked_killable(struct page *page)
363{
364 if (PageLocked(page))
365 return wait_on_page_bit_killable(page, PG_locked);
366 return 0;
367}
368
360/* 369/*
361 * Wait for a page to be unlocked. 370 * Wait for a page to be unlocked.
362 * 371 *