mtd/fs/jffs2 file.c,1.58.2.1,1.58.2.2
David Woodhouse
dwmw2 at infradead.org
Mon Jul 15 06:57:55 EDT 2002
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv11140
Modified Files:
Tag: jffs2-2_4-branch
file.c
Log Message:
Use pg->mapping->host not filp->f_dentry->d_inode in readpage/prepare_write
Index: file.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/file.c,v
retrieving revision 1.58.2.1
retrieving revision 1.58.2.2
diff -u -r1.58.2.1 -r1.58.2.2
--- file.c 23 Feb 2002 14:25:36 -0000 1.58.2.1
+++ file.c 15 Jul 2002 10:57:52 -0000 1.58.2.2
@@ -315,18 +315,18 @@
int jffs2_readpage (struct file *filp, struct page *pg)
{
- struct jffs2_inode_info *f = JFFS2_INODE_INFO(filp->f_dentry->d_inode);
+ struct jffs2_inode_info *f = JFFS2_INODE_INFO(pg->mapping->host);
int ret;
down(&f->sem);
- ret = jffs2_do_readpage_unlock(filp->f_dentry->d_inode, pg);
+ ret = jffs2_do_readpage_unlock(pg->mapping->host, pg);
up(&f->sem);
return ret;
}
int jffs2_prepare_write (struct file *filp, struct page *pg, unsigned start, unsigned end)
{
- struct inode *inode = filp->f_dentry->d_inode;
+ struct inode *inode = pg->mapping->host;
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
__u32 pageofs = pg->index << PAGE_CACHE_SHIFT;
int ret = 0;
@@ -407,7 +407,7 @@
/* Actually commit the write from the page cache page we're looking at.
* For now, we write the full page out each time. It sucks, but it's simple
*/
- struct inode *inode = filp->f_dentry->d_inode;
+ struct inode *inode = pg->mapping->host;
struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
__u32 newsize = max_t(__u32, filp->f_dentry->d_inode->i_size, (pg->index << PAGE_CACHE_SHIFT) + end);
More information about the linux-mtd-cvs
mailing list