summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/build.c
diff options
context:
space:
mode:
authorArtem B. Bityuckiy <dedekind@infradead.org>2005-02-28 08:21:09 +0000
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-05-23 12:47:15 +0200
commit31fbdf7aa5aac8a2a34f180a25deb157297a10c9 (patch)
tree2189fa2b2f74789e259724719826f6508ae305da /fs/jffs2/build.c
parent67e345d17ff8c2085a54c293001ae548f7be7b21 (diff)
downloadop-kernel-dev-31fbdf7aa5aac8a2a34f180a25deb157297a10c9.zip
op-kernel-dev-31fbdf7aa5aac8a2a34f180a25deb157297a10c9.tar.gz
[JFFS2] Fix NOR specific scan BUG
Fix fairly sad NOR-specific bug - during FS building ic->scan_dents isn't zero, but jffs2_mark_node_obsolete() migt be called it tries to finde the ic corresponding to ref - this requires ic->scan_dents = 0. Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/build.c')
-rw-r--r--fs/jffs2/build.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
index a01dd5f..3dd5394 100644
--- a/fs/jffs2/build.c
+++ b/fs/jffs2/build.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: build.c,v 1.69 2004/12/16 20:22:18 dmarlin Exp $
+ * $Id: build.c,v 1.70 2005/02/28 08:21:05 dedekind Exp $
*
*/
@@ -97,14 +97,16 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c)
/* First, scan the medium and build all the inode caches with
lists of physical nodes */
- c->flags |= JFFS2_SB_FLAG_MOUNTING;
+ c->flags |= JFFS2_SB_FLAG_SCANNING;
ret = jffs2_scan_medium(c);
+ c->flags &= ~JFFS2_SB_FLAG_SCANNING;
if (ret)
goto exit;
D1(printk(KERN_DEBUG "Scanned flash completely\n"));
D2(jffs2_dump_block_lists(c));
+ c->flags |= JFFS2_SB_FLAG_BUILDING;
/* Now scan the directory tree, increasing nlink according to every dirent found. */
for_each_inode(i, c, ic) {
D1(printk(KERN_DEBUG "Pass 1: ino #%u\n", ic->ino));
@@ -116,7 +118,6 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c)
cond_resched();
}
}
- c->flags &= ~JFFS2_SB_FLAG_MOUNTING;
D1(printk(KERN_DEBUG "Pass 1 complete\n"));
@@ -164,6 +165,8 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c)
ic->scan_dents = NULL;
cond_resched();
}
+ c->flags &= ~JFFS2_SB_FLAG_BUILDING;
+
D1(printk(KERN_DEBUG "Pass 3 complete\n"));
D2(jffs2_dump_block_lists(c));
OpenPOWER on IntegriCloud