Skip to content

Commit ea7d2ef

Browse files
author
Huang Shijie
committed
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 <[email protected]> Signed-off-by: Brian Norris <[email protected]>
1 parent 65dbf13 commit ea7d2ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/jffs2/fs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,10 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
515515

516516
c = JFFS2_SB_INFO(sb);
517517

518+
/* Do not support the MLC nand */
519+
if (c->mtd->type == MTD_MLCNANDFLASH)
520+
return -EINVAL;
521+
518522
#ifndef CONFIG_JFFS2_FS_WRITEBUFFER
519523
if (c->mtd->type == MTD_NANDFLASH) {
520524
pr_err("Cannot operate on NAND flash unless jffs2 NAND support is compiled in\n");

0 commit comments

Comments
 (0)