logfs: do not use 'mtd->block_isbad' directly
Artem Bityutskiy [Mon, 2 Jan 2012 11:52:14 +0000 (13:52 +0200)]
Instead, use the new 'mtd_can_have_bb()' helper.

Cc: Jörn Engel <joern@logfs.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

fs/logfs/dev_mtd.c

index 3f46588..e97404d 100644 (file)
@@ -152,7 +152,7 @@ static struct page *logfs_mtd_find_first_sb(struct super_block *sb, u64 *ofs)
        filler_t *filler = logfs_mtd_readpage;
        struct mtd_info *mtd = super->s_mtd;
 
-       if (!mtd->block_isbad)
+       if (!mtd_can_have_bb(mtd))
                return NULL;
 
        *ofs = 0;
@@ -172,7 +172,7 @@ static struct page *logfs_mtd_find_last_sb(struct super_block *sb, u64 *ofs)
        filler_t *filler = logfs_mtd_readpage;
        struct mtd_info *mtd = super->s_mtd;
 
-       if (!mtd->block_isbad)
+       if (!mtd_can_have_bb(mtd))
                return NULL;
 
        *ofs = mtd->size - mtd->erasesize;