aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodemgmt.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-22 10:23:10 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-22 10:23:10 -0400
commitfcb7578719529898aef9edce8e409e457a1c2d15 (patch)
tree58022b22d175b69e4b267f2f19ab26d93f7d4910 /fs/jffs2/nodemgmt.c
parenta1b563d652b54647ffacb2d6edf7859d3e97a723 (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/nodemgmt.c')
-rw-r--r--fs/jffs2/nodemgmt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 9a0f312cfcd..e10e58eab8e 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -381,7 +381,8 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uin
381 * Must be called with the alloc_sem held. 381 * Must be called with the alloc_sem held.
382 */ 382 */
383 383
384int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new, uint32_t len) 384int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new,
385 uint32_t len, struct jffs2_inode_cache *ic)
385{ 386{
386 struct jffs2_eraseblock *jeb; 387 struct jffs2_eraseblock *jeb;
387 388
@@ -403,7 +404,7 @@ int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_r
403#endif 404#endif
404 spin_lock(&c->erase_completion_lock); 405 spin_lock(&c->erase_completion_lock);
405 406
406 jffs2_link_node_ref(c, jeb, new, len); 407 jffs2_link_node_ref(c, jeb, new, len, ic);
407 408
408 if (!jeb->free_size && !jeb->dirty_size && !ISDIRTY(jeb->wasted_size)) { 409 if (!jeb->free_size && !jeb->dirty_size && !ISDIRTY(jeb->wasted_size)) {
409 /* If it lives on the dirty_list, jffs2_reserve_space will put it there */ 410 /* If it lives on the dirty_list, jffs2_reserve_space will put it there */