Loading fs/logfs/dev_mtd.c +12 −14 Original line number Diff line number Diff line Loading @@ -150,15 +150,14 @@ static struct page *mtd_find_first_sb(struct super_block *sb, u64 *ofs) filler_t *filler = mtd_readpage; struct mtd_info *mtd = super->s_mtd; if (!mtd->block_isbad) return NULL; *ofs = 0; if (mtd->block_isbad) { while (mtd->block_isbad(mtd, *ofs)) { *ofs += mtd->erasesize; if (*ofs >= mtd->size) return NULL; } } BUG_ON(*ofs & ~PAGE_MASK); return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb); } Loading @@ -170,15 +169,14 @@ static struct page *mtd_find_last_sb(struct super_block *sb, u64 *ofs) filler_t *filler = mtd_readpage; struct mtd_info *mtd = super->s_mtd; if (!mtd->block_isbad) return NULL; *ofs = mtd->size - mtd->erasesize; if (mtd->block_isbad) { while (mtd->block_isbad(mtd, *ofs)) { *ofs -= mtd->erasesize; if (*ofs <= 0) return NULL; } } *ofs = *ofs + mtd->erasesize - 0x1000; BUG_ON(*ofs & ~PAGE_MASK); return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb); Loading Loading
fs/logfs/dev_mtd.c +12 −14 Original line number Diff line number Diff line Loading @@ -150,15 +150,14 @@ static struct page *mtd_find_first_sb(struct super_block *sb, u64 *ofs) filler_t *filler = mtd_readpage; struct mtd_info *mtd = super->s_mtd; if (!mtd->block_isbad) return NULL; *ofs = 0; if (mtd->block_isbad) { while (mtd->block_isbad(mtd, *ofs)) { *ofs += mtd->erasesize; if (*ofs >= mtd->size) return NULL; } } BUG_ON(*ofs & ~PAGE_MASK); return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb); } Loading @@ -170,15 +169,14 @@ static struct page *mtd_find_last_sb(struct super_block *sb, u64 *ofs) filler_t *filler = mtd_readpage; struct mtd_info *mtd = super->s_mtd; if (!mtd->block_isbad) return NULL; *ofs = mtd->size - mtd->erasesize; if (mtd->block_isbad) { while (mtd->block_isbad(mtd, *ofs)) { *ofs -= mtd->erasesize; if (*ofs <= 0) return NULL; } } *ofs = *ofs + mtd->erasesize - 0x1000; BUG_ON(*ofs & ~PAGE_MASK); return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb); Loading