logfs: do not use 'mtd->block_isbad' directly
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 2 Jan 2012 11:52:14 +0000 (13:52 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 9 Jan 2012 18:26:25 +0000 (18:26 +0000)
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 3f465882ee70b84dc7579beb24fe428c6edf9963..e97404d611e0abf4f627d6c080aea0c0739422f0 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;