Lines Matching full:pg

26 			struct page *pg, void *fsdata);
30 static int jffs2_readpage (struct file *filp, struct page *pg);
79 static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg) in jffs2_do_readpage_nolock() argument
87 __func__, inode->i_ino, pg->index << PAGE_SHIFT); in jffs2_do_readpage_nolock()
89 BUG_ON(!PageLocked(pg)); in jffs2_do_readpage_nolock()
91 pg_buf = kmap(pg); in jffs2_do_readpage_nolock()
94 ret = jffs2_read_inode_range(c, f, pg_buf, pg->index << PAGE_SHIFT, in jffs2_do_readpage_nolock()
98 ClearPageUptodate(pg); in jffs2_do_readpage_nolock()
99 SetPageError(pg); in jffs2_do_readpage_nolock()
101 SetPageUptodate(pg); in jffs2_do_readpage_nolock()
102 ClearPageError(pg); in jffs2_do_readpage_nolock()
105 flush_dcache_page(pg); in jffs2_do_readpage_nolock()
106 kunmap(pg); in jffs2_do_readpage_nolock()
112 int jffs2_do_readpage_unlock(void *data, struct page *pg) in jffs2_do_readpage_unlock() argument
114 int ret = jffs2_do_readpage_nolock(data, pg); in jffs2_do_readpage_unlock()
115 unlock_page(pg); in jffs2_do_readpage_unlock()
120 static int jffs2_readpage (struct file *filp, struct page *pg) in jffs2_readpage() argument
122 struct jffs2_inode_info *f = JFFS2_INODE_INFO(pg->mapping->host); in jffs2_readpage()
126 ret = jffs2_do_readpage_unlock(pg->mapping->host, pg); in jffs2_readpage()
135 struct page *pg; in jffs2_write_begin() local
142 pg = grab_cache_page_write_begin(mapping, index, flags); in jffs2_write_begin()
143 if (!pg) in jffs2_write_begin()
145 *pagep = pg; in jffs2_write_begin()
219 if (!PageUptodate(pg)) { in jffs2_write_begin()
221 ret = jffs2_do_readpage_nolock(inode, pg); in jffs2_write_begin()
226 jffs2_dbg(1, "end write_begin(). pg->flags %lx\n", pg->flags); in jffs2_write_begin()
230 unlock_page(pg); in jffs2_write_begin()
231 put_page(pg); in jffs2_write_begin()
237 struct page *pg, void *fsdata) in jffs2_write_end() argument
253 __func__, inode->i_ino, pg->index << PAGE_SHIFT, in jffs2_write_end()
254 start, end, pg->flags); in jffs2_write_end()
260 BUG_ON(!PageUptodate(pg)); in jffs2_write_end()
275 unlock_page(pg); in jffs2_write_end()
276 put_page(pg); in jffs2_write_end()
290 kmap(pg); in jffs2_write_end()
292 ret = jffs2_write_inode_range(c, f, ri, page_address(pg) + aligned_start, in jffs2_write_end()
293 (pg->index << PAGE_SHIFT) + aligned_start, in jffs2_write_end()
296 kunmap(pg); in jffs2_write_end()
300 SetPageError(pg); in jffs2_write_end()
323 SetPageError(pg); in jffs2_write_end()
324 ClearPageUptodate(pg); in jffs2_write_end()
329 unlock_page(pg); in jffs2_write_end()
330 put_page(pg); in jffs2_write_end()