aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodemgmt.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-20 23:36:45 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-20 23:36:45 -0400
commitb64335f2b740d6f5dbf5d3b04af30d407bf599f5 (patch)
tree442e85ebc977f8d01bf9c1fe6dfbe898788422c5 /fs/jffs2/nodemgmt.c
parent49f11d40751b974f3b829f208eefa6f97a10cac8 (diff)
[JFFS2] Add length argument to jffs2_add_physical_node_ref()
If __totlen is going away, we need to pass the length in separately. Also stop callers from needlessly setting ref->next_phys to NULL, since that's done for them... and since that'll also be going away soon. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/nodemgmt.c')
-rw-r--r--fs/jffs2/nodemgmt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index d6eab1b7ad53..4701556be49d 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -374,7 +374,6 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uin
374 * @c: superblock info 374 * @c: superblock info
375 * @new: new node reference to add 375 * @new: new node reference to add
376 * @len: length of this physical node 376 * @len: length of this physical node
377 * @dirty: dirty flag for new node
378 * 377 *
379 * Should only be used to report nodes for which space has been allocated 378 * Should only be used to report nodes for which space has been allocated
380 * by jffs2_reserve_space. 379 * by jffs2_reserve_space.
@@ -382,13 +381,12 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uin
382 * Must be called with the alloc_sem held. 381 * Must be called with the alloc_sem held.
383 */ 382 */
384 383
385int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new) 384int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new, uint32_t len)
386{ 385{
387 struct jffs2_eraseblock *jeb; 386 struct jffs2_eraseblock *jeb;
388 uint32_t len;
389 387
390 jeb = &c->blocks[new->flash_offset / c->sector_size]; 388 jeb = &c->blocks[new->flash_offset / c->sector_size];
391 len = ref_totlen(c, jeb, new); 389 new->__totlen = len;
392 390
393 D1(printk(KERN_DEBUG "jffs2_add_physical_node_ref(): Node at 0x%x(%d), size 0x%x\n", ref_offset(new), ref_flags(new), len)); 391 D1(printk(KERN_DEBUG "jffs2_add_physical_node_ref(): Node at 0x%x(%d), size 0x%x\n", ref_offset(new), ref_flags(new), len));
394#if 1 392#if 1