Skip to content

Commit

Permalink
logfs: do not use 'mtd->block_isbad' directly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jan 9, 2012
1 parent 8f461a7 commit d58b27e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/logfs/dev_mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit d58b27e

Please sign in to comment.