Patchwork [16/17] logfs: do not use 'mtd->block_isbad' directly

login
register
mail settings
Submitter Artem Bityutskiy
Date Jan. 2, 2012, 12:20 p.m.
Message ID <1325506847-23470-17-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/133834/
State New
Headers show

Comments

Artem Bityutskiy - Jan. 2, 2012, 12:20 p.m.
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

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>
---
 fs/logfs/dev_mtd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c
index 3f465882..e97404d 100644
--- a/fs/logfs/dev_mtd.c
+++ b/fs/logfs/dev_mtd.c
@@ -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;