summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-01-02 13:59:12 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 18:26:26 +0000
commit800ffd3496987e91f599a135060ef49731e045ac (patch)
treea62c4985597e6ce01d8f8ab07f67212357e2a846 /fs
parentd58b27ed58a30faf376e40d19945f34301944b8d (diff)
downloadlinux-800ffd3496987e91f599a135060ef49731e045ac.tar.bz2
mtd: do not use mtd->block_markbad directly
Instead, use the new 'mtd_can_have_bb()', or just rely on 'mtd_block_markbad()' return code, which will be -EOPNOTSUPP if bad blocks are not supported. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/jffs2/wbuf.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index fd96b757433f..30e8f47e8a23 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1130,9 +1130,6 @@ int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock *
if( ++jeb->bad_count < MAX_ERASE_FAILURES)
return 0;
- if (!c->mtd->block_markbad)
- return 1; // What else can we do?
-
printk(KERN_WARNING "JFFS2: marking eraseblock at %08x\n as bad", bad_offset);
ret = mtd_block_markbad(c->mtd, bad_offset);