• Home
  • Raw
  • Download

Lines Matching refs:page

43 static int ufs_commit_chunk(struct page *page, loff_t pos, unsigned len)  in ufs_commit_chunk()  argument
45 struct address_space *mapping = page->mapping; in ufs_commit_chunk()
50 block_write_end(NULL, mapping, pos, len, len, page, NULL); in ufs_commit_chunk()
56 err = write_one_page(page, 1); in ufs_commit_chunk()
58 unlock_page(page); in ufs_commit_chunk()
62 static inline void ufs_put_page(struct page *page) in ufs_put_page() argument
64 kunmap(page); in ufs_put_page()
65 page_cache_release(page); in ufs_put_page()
77 struct page *page; in ufs_inode_by_name() local
79 de = ufs_find_entry(dir, qstr, &page); in ufs_inode_by_name()
82 ufs_put_page(page); in ufs_inode_by_name()
90 struct page *page, struct inode *inode) in ufs_set_link() argument
92 loff_t pos = page_offset(page) + in ufs_set_link()
93 (char *) de - (char *) page_address(page); in ufs_set_link()
97 lock_page(page); in ufs_set_link()
98 err = ufs_prepare_chunk(page, pos, len); in ufs_set_link()
104 err = ufs_commit_chunk(page, pos, len); in ufs_set_link()
105 ufs_put_page(page); in ufs_set_link()
111 static void ufs_check_page(struct page *page) in ufs_check_page() argument
113 struct inode *dir = page->mapping->host; in ufs_check_page()
115 char *kaddr = page_address(page); in ufs_check_page()
122 if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) { in ufs_check_page()
148 SetPageChecked(page); in ufs_check_page()
176 dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs, in ufs_check_page()
184 dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs); in ufs_check_page()
186 SetPageChecked(page); in ufs_check_page()
187 SetPageError(page); in ufs_check_page()
190 static struct page *ufs_get_page(struct inode *dir, unsigned long n) in ufs_get_page()
193 struct page *page = read_mapping_page(mapping, n, NULL); in ufs_get_page() local
194 if (!IS_ERR(page)) { in ufs_get_page()
195 kmap(page); in ufs_get_page()
196 if (!PageChecked(page)) in ufs_get_page()
197 ufs_check_page(page); in ufs_get_page()
198 if (PageError(page)) in ufs_get_page()
201 return page; in ufs_get_page()
204 ufs_put_page(page); in ufs_get_page()
230 struct ufs_dir_entry *ufs_dotdot(struct inode *dir, struct page **p) in ufs_dotdot()
232 struct page *page = ufs_get_page(dir, 0); in ufs_dotdot() local
235 if (!IS_ERR(page)) { in ufs_dotdot()
237 (struct ufs_dir_entry *)page_address(page)); in ufs_dotdot()
238 *p = page; in ufs_dotdot()
252 struct page **res_page) in ufs_find_entry()
260 struct page *page = NULL; in ufs_find_entry() local
279 page = ufs_get_page(dir, n); in ufs_find_entry()
280 if (!IS_ERR(page)) { in ufs_find_entry()
281 kaddr = page_address(page); in ufs_find_entry()
288 ufs_put_page(page); in ufs_find_entry()
295 ufs_put_page(page); in ufs_find_entry()
304 *res_page = page; in ufs_find_entry()
321 struct page *page = NULL; in ufs_add_link() local
339 page = ufs_get_page(dir, n); in ufs_add_link()
340 err = PTR_ERR(page); in ufs_add_link()
341 if (IS_ERR(page)) in ufs_add_link()
343 lock_page(page); in ufs_add_link()
344 kaddr = page_address(page); in ufs_add_link()
374 unlock_page(page); in ufs_add_link()
375 ufs_put_page(page); in ufs_add_link()
381 pos = page_offset(page) + in ufs_add_link()
382 (char*)de - (char*)page_address(page); in ufs_add_link()
383 err = ufs_prepare_chunk(page, pos, rec_len); in ufs_add_link()
400 err = ufs_commit_chunk(page, pos, rec_len); in ufs_add_link()
406 ufs_put_page(page); in ufs_add_link()
410 unlock_page(page); in ufs_add_link()
454 struct page *page = ufs_get_page(inode, n); in ufs_readdir() local
456 if (IS_ERR(page)) { in ufs_readdir()
463 kaddr = page_address(page); in ufs_readdir()
478 ufs_put_page(page); in ufs_readdir()
499 ufs_put_page(page); in ufs_readdir()
505 ufs_put_page(page); in ufs_readdir()
516 struct page * page) in ufs_delete_entry() argument
519 char *kaddr = page_address(page); in ufs_delete_entry()
545 from = (char*)pde - (char*)page_address(page); in ufs_delete_entry()
547 pos = page_offset(page) + from; in ufs_delete_entry()
548 lock_page(page); in ufs_delete_entry()
549 err = ufs_prepare_chunk(page, pos, to - from); in ufs_delete_entry()
554 err = ufs_commit_chunk(page, pos, to - from); in ufs_delete_entry()
558 ufs_put_page(page); in ufs_delete_entry()
567 struct page *page = grab_cache_page(mapping, 0); in ufs_make_empty() local
573 if (!page) in ufs_make_empty()
576 err = ufs_prepare_chunk(page, 0, chunk_size); in ufs_make_empty()
578 unlock_page(page); in ufs_make_empty()
582 kmap(page); in ufs_make_empty()
583 base = (char*)page_address(page); in ufs_make_empty()
600 kunmap(page); in ufs_make_empty()
602 err = ufs_commit_chunk(page, 0, chunk_size); in ufs_make_empty()
604 page_cache_release(page); in ufs_make_empty()
614 struct page *page = NULL; in ufs_empty_dir() local
620 page = ufs_get_page(inode, i); in ufs_empty_dir()
622 if (IS_ERR(page)) in ufs_empty_dir()
625 kaddr = page_address(page); in ufs_empty_dir()
652 ufs_put_page(page); in ufs_empty_dir()
657 ufs_put_page(page); in ufs_empty_dir()