Skip to content

Commit d58b27e

Browse files
dedekindDavid Woodhouse
authored andcommitted
logfs: do not use 'mtd->block_isbad' directly
Instead, use the new 'mtd_can_have_bb()' helper. Cc: Jörn Engel <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
1 parent 8f461a7 commit d58b27e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/logfs/dev_mtd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static struct page *logfs_mtd_find_first_sb(struct super_block *sb, u64 *ofs)
152152
filler_t *filler = logfs_mtd_readpage;
153153
struct mtd_info *mtd = super->s_mtd;
154154

155-
if (!mtd->block_isbad)
155+
if (!mtd_can_have_bb(mtd))
156156
return NULL;
157157

158158
*ofs = 0;
@@ -172,7 +172,7 @@ static struct page *logfs_mtd_find_last_sb(struct super_block *sb, u64 *ofs)
172172
filler_t *filler = logfs_mtd_readpage;
173173
struct mtd_info *mtd = super->s_mtd;
174174

175-
if (!mtd->block_isbad)
175+
if (!mtd_can_have_bb(mtd))
176176
return NULL;
177177

178178
*ofs = mtd->size - mtd->erasesize;

0 commit comments

Comments
 (0)