diff options
author | Jason Liu <r64343@freescale.com> | 2008-03-14 21:53:04 -0500 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2009-10-13 11:01:44 -0400 |
commit | 389b6ab80a8702a7483aababf3629f7d02740171 (patch) | |
tree | 2907290f62074abce45e4808e3b929c1f269f18d /fs | |
parent | 4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff) |
ENGR00068619 JFFS2 community fix with not use OOB
JFFS2 community fix with not use OOB at MLC NAND, this patch
is coming from the MTD community
Signed-off-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/fs.c | 6 | ||||
-rw-r--r-- | fs/jffs2/os-linux.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 249305d65d5b..cf677ad82e3e 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -680,7 +680,9 @@ void jffs2_gc_release_page(struct jffs2_sb_info *c, static int jffs2_flash_setup(struct jffs2_sb_info *c) { int ret = 0; - if (jffs2_cleanmarker_oob(c)) { + if (c->mtd->type == MTD_NANDFLASH) { + if (!(c->mtd->flags & MTD_OOB_WRITEABLE)) + printk(KERN_INFO "JFFS2 doesn't use OOB.\n"); /* NAND flash... do setup accordingly */ ret = jffs2_nand_flash_setup(c); if (ret) @@ -713,7 +715,7 @@ static int jffs2_flash_setup(struct jffs2_sb_info *c) { void jffs2_flash_cleanup(struct jffs2_sb_info *c) { - if (jffs2_cleanmarker_oob(c)) { + if (c->mtd->type == MTD_NANDFLASH) { jffs2_nand_flash_cleanup(c); } diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index 5e194a5c8e29..a0f7af6aa69b 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h @@ -110,7 +110,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) #define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE)) #endif -#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) +#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH && (c->mtd->flags & MTD_OOB_WRITEABLE)) #define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf)) #define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf)) |