• Home
  • Raw
  • Download

Lines Matching refs:page

81 void do_invalidatepage(struct page *page, unsigned int offset,  in do_invalidatepage()  argument
84 void (*invalidatepage)(struct page *, unsigned int, unsigned int); in do_invalidatepage()
86 invalidatepage = page->mapping->a_ops->invalidatepage; in do_invalidatepage()
92 (*invalidatepage)(page, offset, length); in do_invalidatepage()
109 void cancel_dirty_page(struct page *page, unsigned int account_size) in cancel_dirty_page() argument
111 if (TestClearPageDirty(page)) { in cancel_dirty_page()
112 struct address_space *mapping = page->mapping; in cancel_dirty_page()
114 dec_zone_page_state(page, NR_FILE_DIRTY); in cancel_dirty_page()
135 truncate_complete_page(struct address_space *mapping, struct page *page) in truncate_complete_page() argument
137 if (page->mapping != mapping) in truncate_complete_page()
140 if (page_has_private(page)) in truncate_complete_page()
141 do_invalidatepage(page, 0, PAGE_CACHE_SIZE); in truncate_complete_page()
143 cancel_dirty_page(page, PAGE_CACHE_SIZE); in truncate_complete_page()
145 ClearPageMappedToDisk(page); in truncate_complete_page()
146 delete_from_page_cache(page); in truncate_complete_page()
159 invalidate_complete_page(struct address_space *mapping, struct page *page) in invalidate_complete_page() argument
163 if (page->mapping != mapping) in invalidate_complete_page()
166 if (page_has_private(page) && !try_to_release_page(page, 0)) in invalidate_complete_page()
169 ret = remove_mapping(mapping, page); in invalidate_complete_page()
174 int truncate_inode_page(struct address_space *mapping, struct page *page) in truncate_inode_page() argument
176 if (page_mapped(page)) { in truncate_inode_page()
178 (loff_t)page->index << PAGE_CACHE_SHIFT, in truncate_inode_page()
181 return truncate_complete_page(mapping, page); in truncate_inode_page()
187 int generic_error_remove_page(struct address_space *mapping, struct page *page) in generic_error_remove_page() argument
197 return truncate_inode_page(mapping, page); in generic_error_remove_page()
207 int invalidate_inode_page(struct page *page) in invalidate_inode_page() argument
209 struct address_space *mapping = page_mapping(page); in invalidate_inode_page()
212 if (PageDirty(page) || PageWriteback(page)) in invalidate_inode_page()
214 if (page_mapped(page)) in invalidate_inode_page()
216 return invalidate_complete_page(mapping, page); in invalidate_inode_page()
286 struct page *page = pvec.pages[i]; in truncate_inode_pages_range() local
293 if (radix_tree_exceptional_entry(page)) { in truncate_inode_pages_range()
294 clear_exceptional_entry(mapping, index, page); in truncate_inode_pages_range()
298 if (!trylock_page(page)) in truncate_inode_pages_range()
300 WARN_ON(page->index != index); in truncate_inode_pages_range()
301 if (PageWriteback(page)) { in truncate_inode_pages_range()
302 unlock_page(page); in truncate_inode_pages_range()
305 truncate_inode_page(mapping, page); in truncate_inode_pages_range()
306 unlock_page(page); in truncate_inode_pages_range()
315 struct page *page = find_lock_page(mapping, start - 1); in truncate_inode_pages_range() local
316 if (page) { in truncate_inode_pages_range()
323 wait_on_page_writeback(page); in truncate_inode_pages_range()
324 zero_user_segment(page, partial_start, top); in truncate_inode_pages_range()
325 cleancache_invalidate_page(mapping, page); in truncate_inode_pages_range()
326 if (page_has_private(page)) in truncate_inode_pages_range()
327 do_invalidatepage(page, partial_start, in truncate_inode_pages_range()
329 unlock_page(page); in truncate_inode_pages_range()
330 page_cache_release(page); in truncate_inode_pages_range()
334 struct page *page = find_lock_page(mapping, end); in truncate_inode_pages_range() local
335 if (page) { in truncate_inode_pages_range()
336 wait_on_page_writeback(page); in truncate_inode_pages_range()
337 zero_user_segment(page, 0, partial_end); in truncate_inode_pages_range()
338 cleancache_invalidate_page(mapping, page); in truncate_inode_pages_range()
339 if (page_has_private(page)) in truncate_inode_pages_range()
340 do_invalidatepage(page, 0, in truncate_inode_pages_range()
342 unlock_page(page); in truncate_inode_pages_range()
343 page_cache_release(page); in truncate_inode_pages_range()
372 struct page *page = pvec.pages[i]; in truncate_inode_pages_range() local
382 if (radix_tree_exceptional_entry(page)) { in truncate_inode_pages_range()
383 clear_exceptional_entry(mapping, index, page); in truncate_inode_pages_range()
387 lock_page(page); in truncate_inode_pages_range()
388 WARN_ON(page->index != index); in truncate_inode_pages_range()
389 wait_on_page_writeback(page); in truncate_inode_pages_range()
390 truncate_inode_page(mapping, page); in truncate_inode_pages_range()
391 unlock_page(page); in truncate_inode_pages_range()
494 struct page *page = pvec.pages[i]; in invalidate_mapping_pages() local
501 if (radix_tree_exceptional_entry(page)) { in invalidate_mapping_pages()
502 clear_exceptional_entry(mapping, index, page); in invalidate_mapping_pages()
506 if (!trylock_page(page)) in invalidate_mapping_pages()
508 WARN_ON(page->index != index); in invalidate_mapping_pages()
509 ret = invalidate_inode_page(page); in invalidate_mapping_pages()
510 unlock_page(page); in invalidate_mapping_pages()
516 deactivate_file_page(page); in invalidate_mapping_pages()
536 invalidate_complete_page2(struct address_space *mapping, struct page *page) in invalidate_complete_page2() argument
538 if (page->mapping != mapping) in invalidate_complete_page2()
541 if (page_has_private(page) && !try_to_release_page(page, GFP_KERNEL)) in invalidate_complete_page2()
545 if (PageDirty(page)) in invalidate_complete_page2()
548 BUG_ON(page_has_private(page)); in invalidate_complete_page2()
549 __delete_from_page_cache(page, NULL); in invalidate_complete_page2()
553 mapping->a_ops->freepage(page); in invalidate_complete_page2()
555 page_cache_release(page); /* pagecache ref */ in invalidate_complete_page2()
562 static int do_launder_page(struct address_space *mapping, struct page *page) in do_launder_page() argument
564 if (!PageDirty(page)) in do_launder_page()
566 if (page->mapping != mapping || mapping->a_ops->launder_page == NULL) in do_launder_page()
568 return mapping->a_ops->launder_page(page); in do_launder_page()
600 struct page *page = pvec.pages[i]; in invalidate_inode_pages2_range() local
607 if (radix_tree_exceptional_entry(page)) { in invalidate_inode_pages2_range()
608 clear_exceptional_entry(mapping, index, page); in invalidate_inode_pages2_range()
612 lock_page(page); in invalidate_inode_pages2_range()
613 WARN_ON(page->index != index); in invalidate_inode_pages2_range()
614 if (page->mapping != mapping) { in invalidate_inode_pages2_range()
615 unlock_page(page); in invalidate_inode_pages2_range()
618 wait_on_page_writeback(page); in invalidate_inode_pages2_range()
619 if (page_mapped(page)) { in invalidate_inode_pages2_range()
639 BUG_ON(page_mapped(page)); in invalidate_inode_pages2_range()
640 ret2 = do_launder_page(mapping, page); in invalidate_inode_pages2_range()
642 if (!invalidate_complete_page2(mapping, page)) in invalidate_inode_pages2_range()
647 unlock_page(page); in invalidate_inode_pages2_range()
756 struct page *page; in pagecache_isize_extended() local
769 page = find_lock_page(inode->i_mapping, index); in pagecache_isize_extended()
771 if (!page) in pagecache_isize_extended()
777 if (page_mkclean(page)) in pagecache_isize_extended()
778 set_page_dirty(page); in pagecache_isize_extended()
779 unlock_page(page); in pagecache_isize_extended()
780 page_cache_release(page); in pagecache_isize_extended()