From 79e74595e9ecd6e8a1a6919b986254ad59666c61 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 27 May 2006 13:15:16 +0100 Subject: [PATCH] --- yaml --- r: 27896 b: refs/heads/master c: ddc58bd65ebe58c243e9f609384825df9ffd04ad h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/jffs2/wbuf.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 37c8a340b41a..2f9adc745b4f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ba0251fe87ea560eb377917e06ba0b5b9ab89094 +refs/heads/master: ddc58bd65ebe58c243e9f609384825df9ffd04ad diff --git a/trunk/fs/jffs2/wbuf.c b/trunk/fs/jffs2/wbuf.c index 2febece89062..717fa2f52ac2 100644 --- a/trunk/fs/jffs2/wbuf.c +++ b/trunk/fs/jffs2/wbuf.c @@ -190,6 +190,10 @@ static struct jffs2_raw_node_ref **jffs2_incore_replace_raw(struct jffs2_sb_info switch (je16_to_cpu(node->u.nodetype)) { case JFFS2_NODETYPE_INODE: + if (f->metadata && f->metadata->raw == raw) { + dbg_noderef("Will replace ->raw in f->metadata at %p\n", f->metadata); + return &f->metadata->raw; + } frag = jffs2_lookup_node_frag(&f->fragtree, je32_to_cpu(node->i.offset)); BUG_ON(!frag); /* Find a frag which refers to the full_dnode we want to modify */ @@ -199,7 +203,6 @@ static struct jffs2_raw_node_ref **jffs2_incore_replace_raw(struct jffs2_sb_info } dbg_noderef("Will replace ->raw in full_dnode at %p\n", frag->node); return &frag->node->raw; - break; case JFFS2_NODETYPE_DIRENT: for (fd = f->dents; fd; fd = fd->next) { @@ -209,6 +212,7 @@ static struct jffs2_raw_node_ref **jffs2_incore_replace_raw(struct jffs2_sb_info } } BUG(); + default: dbg_noderef("Don't care about replacing raw for nodetype %x\n", je16_to_cpu(node->u.nodetype));