diff options
author | Andrew Lunn <andrew@lunn.ch> | 2005-07-30 11:29:30 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 12:06:10 -0500 |
commit | 737b7661e059680a68afb3df0a088fd976f666b7 (patch) | |
tree | 4d590f906217780f5e73ddbbf6ff39e7dd7b74c0 /fs/jffs2/build.c | |
parent | e0d601373b1123ea43b1fdec08d9e58a079ae35c (diff) |
[JFFS2] Fix up new debug code for eCos build
The debug code cleanup broke the eCos build.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/build.c')
-rw-r--r-- | fs/jffs2/build.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c index f08984a64a5a..8e2f1f4e8aa3 100644 --- a/fs/jffs2/build.c +++ b/fs/jffs2/build.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: build.c,v 1.75 2005/07/22 10:32:07 dedekind Exp $ | 10 | * $Id: build.c,v 1.76 2005/07/30 15:29:27 lunn Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -317,9 +317,11 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c) | |||
317 | 317 | ||
318 | c->free_size = c->flash_size; | 318 | c->free_size = c->flash_size; |
319 | c->nr_blocks = c->flash_size / c->sector_size; | 319 | c->nr_blocks = c->flash_size / c->sector_size; |
320 | #ifndef __ECOS | ||
320 | if (c->mtd->flags & MTD_NO_VIRTBLOCKS) | 321 | if (c->mtd->flags & MTD_NO_VIRTBLOCKS) |
321 | c->blocks = vmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks); | 322 | c->blocks = vmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks); |
322 | else | 323 | else |
324 | #endif | ||
323 | c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, GFP_KERNEL); | 325 | c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, GFP_KERNEL); |
324 | if (!c->blocks) | 326 | if (!c->blocks) |
325 | return -ENOMEM; | 327 | return -ENOMEM; |
@@ -353,11 +355,13 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c) | |||
353 | D1(printk(KERN_DEBUG "build_fs failed\n")); | 355 | D1(printk(KERN_DEBUG "build_fs failed\n")); |
354 | jffs2_free_ino_caches(c); | 356 | jffs2_free_ino_caches(c); |
355 | jffs2_free_raw_node_refs(c); | 357 | jffs2_free_raw_node_refs(c); |
356 | if (c->mtd->flags & MTD_NO_VIRTBLOCKS) { | 358 | #ifndef __ECOS |
357 | vfree(c->blocks); | 359 | if (c->mtd->flags & MTD_NO_VIRTBLOCKS) |
358 | } else { | 360 | vfree(c->blocks); |
359 | kfree(c->blocks); | 361 | else |
360 | } | 362 | #endif |
363 | kfree(c->blocks); | ||
364 | |||
361 | return -EIO; | 365 | return -EIO; |
362 | } | 366 | } |
363 | 367 | ||