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>
	
	
This commit is contained in:
		
					parent
					
						
							
								fa25c503df
							
						
					
				
			
			
				commit
				
					
						f62e00cc3a
					
				
			
		
					 2 changed files with 20 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -357,6 +357,15 @@ static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm,
 | 
			
		|||
 */
 | 
			
		||||
extern void wait_on_page_bit(struct page *page, int bit_nr);
 | 
			
		||||
 | 
			
		||||
extern int wait_on_page_bit_killable(struct page *page, int bit_nr);
 | 
			
		||||
 | 
			
		||||
static inline int wait_on_page_locked_killable(struct page *page)
 | 
			
		||||
{
 | 
			
		||||
	if (PageLocked(page))
 | 
			
		||||
		return wait_on_page_bit_killable(page, PG_locked);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
 * Wait for a page to be unlocked.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue