mtd/fs/jffs2 file.c,1.72,1.73
David Woodhouse
dwmw2 at infradead.org
Mon Jul 15 06:49:35 EDT 2002
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv10856
Modified Files:
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.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- file.c 20 May 2002 14:56:38 -0000 1.72
+++ file.c 15 Jul 2002 10:49:33 -0000 1.73
@@ -258,18 +258,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);
uint32_t pageofs = pg->index << PAGE_CACHE_SHIFT;
int ret = 0;
@@ -353,7 +353,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);
struct jffs2_raw_inode *ri;
More information about the linux-mtd-cvs
mailing list