Lines Matching full:pg
26 struct page *pg, void *fsdata);
80 static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg) in jffs2_do_readpage_nolock() argument
88 __func__, inode->i_ino, pg->index << PAGE_SHIFT); in jffs2_do_readpage_nolock()
90 BUG_ON(!PageLocked(pg)); in jffs2_do_readpage_nolock()
92 pg_buf = kmap(pg); in jffs2_do_readpage_nolock()
95 ret = jffs2_read_inode_range(c, f, pg_buf, pg->index << PAGE_SHIFT, in jffs2_do_readpage_nolock()
99 ClearPageUptodate(pg); in jffs2_do_readpage_nolock()
100 SetPageError(pg); in jffs2_do_readpage_nolock()
102 SetPageUptodate(pg); in jffs2_do_readpage_nolock()
103 ClearPageError(pg); in jffs2_do_readpage_nolock()
106 flush_dcache_page(pg); in jffs2_do_readpage_nolock()
107 kunmap(pg); in jffs2_do_readpage_nolock()
135 struct page *pg; in jffs2_write_begin() local
214 pg = grab_cache_page_write_begin(mapping, index); in jffs2_write_begin()
215 if (!pg) { in jffs2_write_begin()
219 *pagep = pg; in jffs2_write_begin()
226 if (!PageUptodate(pg)) { in jffs2_write_begin()
228 ret = jffs2_do_readpage_nolock(inode, pg); in jffs2_write_begin()
231 unlock_page(pg); in jffs2_write_begin()
232 put_page(pg); in jffs2_write_begin()
236 jffs2_dbg(1, "end write_begin(). pg->flags %lx\n", pg->flags); in jffs2_write_begin()
246 struct page *pg, void *fsdata) in jffs2_write_end() argument
262 __func__, inode->i_ino, pg->index << PAGE_SHIFT, in jffs2_write_end()
263 start, end, pg->flags); in jffs2_write_end()
269 BUG_ON(!PageUptodate(pg)); in jffs2_write_end()
284 unlock_page(pg); in jffs2_write_end()
285 put_page(pg); in jffs2_write_end()
299 kmap(pg); in jffs2_write_end()
301 ret = jffs2_write_inode_range(c, f, ri, page_address(pg) + aligned_start, in jffs2_write_end()
302 (pg->index << PAGE_SHIFT) + aligned_start, in jffs2_write_end()
305 kunmap(pg); in jffs2_write_end()
309 SetPageError(pg); in jffs2_write_end()
333 SetPageError(pg); in jffs2_write_end()
334 ClearPageUptodate(pg); in jffs2_write_end()
339 unlock_page(pg); in jffs2_write_end()
340 put_page(pg); in jffs2_write_end()