diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-22 10:23:10 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-22 10:23:10 -0400 |
commit | fcb7578719529898aef9edce8e409e457a1c2d15 (patch) | |
tree | 58022b22d175b69e4b267f2f19ab26d93f7d4910 /fs/jffs2/wbuf.c | |
parent | a1b563d652b54647ffacb2d6edf7859d3e97a723 (diff) |
[JFFS2] Extend jffs2_link_node_ref() to link into per-inode list too.
Let's avoid the potential for forgetting to set ref->next_in_ino, by doing
it within jffs2_link_node_ref() instead.
This highlights the ugliness of what we're currently doing with
xattr_datum and xattr_ref structures -- we should find a nicer way of
dealing with that.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r-- | fs/jffs2/wbuf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 45e3573cf107..62f685faeba8 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -312,9 +312,8 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) | |||
312 | return; | 312 | return; |
313 | 313 | ||
314 | raw2->flash_offset = ofs | REF_OBSOLETE; | 314 | raw2->flash_offset = ofs | REF_OBSOLETE; |
315 | raw2->next_in_ino = NULL; | ||
316 | 315 | ||
317 | jffs2_add_physical_node_ref(c, raw2, ref_totlen(c, jeb, *first_raw)); | 316 | jffs2_add_physical_node_ref(c, raw2, ref_totlen(c, jeb, *first_raw), NULL); |
318 | } | 317 | } |
319 | return; | 318 | return; |
320 | } | 319 | } |
@@ -507,11 +506,10 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) | |||
507 | return -ENOMEM; | 506 | return -ENOMEM; |
508 | ref->flash_offset = c->wbuf_ofs + c->wbuf_len; | 507 | ref->flash_offset = c->wbuf_ofs + c->wbuf_len; |
509 | ref->flash_offset |= REF_OBSOLETE; | 508 | ref->flash_offset |= REF_OBSOLETE; |
510 | ref->next_in_ino = NULL; | ||
511 | 509 | ||
512 | spin_lock(&c->erase_completion_lock); | 510 | spin_lock(&c->erase_completion_lock); |
513 | 511 | ||
514 | jffs2_link_node_ref(c, jeb, ref, waste); | 512 | jffs2_link_node_ref(c, jeb, ref, waste, NULL); |
515 | /* FIXME: that made it count as dirty. Convert to wasted */ | 513 | /* FIXME: that made it count as dirty. Convert to wasted */ |
516 | jeb->dirty_size -= waste; | 514 | jeb->dirty_size -= waste; |
517 | c->dirty_size -= waste; | 515 | c->dirty_size -= waste; |