aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 02:58:20 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:06:05 -0400
commit30551f42db511a87dcefd7f366065916b84298eb (patch)
treefc9620c3e902da05c1b1bae504b67abbfca1cf08
parent7e3f3a42b1b9d4585592d325d1cfe52a92f9ae19 (diff)
jffs2: do not support the MLC nand
We should not support the MLC nand for jffs2. So if the nand type is MLC, we quit immediatly. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--fs/jffs2/fs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index fe3c0527545f..09b3ed455724 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -515,6 +515,10 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
515 515
516 c = JFFS2_SB_INFO(sb); 516 c = JFFS2_SB_INFO(sb);
517 517
518 /* Do not support the MLC nand */
519 if (c->mtd->type == MTD_MLCNANDFLASH)
520 return -EINVAL;
521
518#ifndef CONFIG_JFFS2_FS_WRITEBUFFER 522#ifndef CONFIG_JFFS2_FS_WRITEBUFFER
519 if (c->mtd->type == MTD_NANDFLASH) { 523 if (c->mtd->type == MTD_NANDFLASH) {
520 pr_err("Cannot operate on NAND flash unless jffs2 NAND support is compiled in\n"); 524 pr_err("Cannot operate on NAND flash unless jffs2 NAND support is compiled in\n");