aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/file.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-22 19:38:06 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-22 19:38:06 -0400
commit9fe4854cd1f60273f9a3ece053f4789605f58a5e (patch)
tree277ac17807a1596f78464641500ed35f3d47a32a /fs/jffs2/file.c
parent5fa433942ba4e399f7e28764c9db4ade89e91d40 (diff)
[JFFS2] Remove flash offset argument from various functions.
We don't need the upper layers to deal with the physical offset. It's _always_ c->nextblock->offset + c->sector_size - c->nextblock->free_size so we might as well just let the actual write functions deal with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/file.c')
-rw-r--r--fs/jffs2/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index e18c9437d58f..bb8844f40e48 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -134,13 +134,13 @@ static int jffs2_prepare_write (struct file *filp, struct page *pg,
134 struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); 134 struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
135 struct jffs2_raw_inode ri; 135 struct jffs2_raw_inode ri;
136 struct jffs2_full_dnode *fn; 136 struct jffs2_full_dnode *fn;
137 uint32_t phys_ofs, alloc_len; 137 uint32_t alloc_len;
138 138
139 D1(printk(KERN_DEBUG "Writing new hole frag 0x%x-0x%x between current EOF and new page\n", 139 D1(printk(KERN_DEBUG "Writing new hole frag 0x%x-0x%x between current EOF and new page\n",
140 (unsigned int)inode->i_size, pageofs)); 140 (unsigned int)inode->i_size, pageofs));
141 141
142 ret = jffs2_reserve_space(c, sizeof(ri), &phys_ofs, &alloc_len, 142 ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
143 ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); 143 ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
144 if (ret) 144 if (ret)
145 return ret; 145 return ret;
146 146
@@ -166,7 +166,7 @@ static int jffs2_prepare_write (struct file *filp, struct page *pg,
166 ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); 166 ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8));
167 ri.data_crc = cpu_to_je32(0); 167 ri.data_crc = cpu_to_je32(0);
168 168
169 fn = jffs2_write_dnode(c, f, &ri, NULL, 0, phys_ofs, ALLOC_NORMAL); 169 fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_NORMAL);
170 170
171 if (IS_ERR(fn)) { 171 if (IS_ERR(fn)) {
172 ret = PTR_ERR(fn); 172 ret = PTR_ERR(fn);