forked from mirrors/linux
		
	new helper: put_and_unmap_page()
kunmap_local() + put_page(), as done by e.g. ext2 directory handling. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
		
							parent
							
								
									fe15c26ee2
								
							
						
					
					
						commit
						849ad04cf5
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -481,4 +481,10 @@ static inline void folio_zero_range(struct folio *folio,
 | 
				
			||||||
	zero_user_segments(&folio->page, start, start + length, 0, 0);
 | 
						zero_user_segments(&folio->page, start, start + length, 0, 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void put_and_unmap_page(struct page *page, void *addr)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						kunmap_local(addr);
 | 
				
			||||||
 | 
						put_page(page);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _LINUX_HIGHMEM_H */
 | 
					#endif /* _LINUX_HIGHMEM_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue