mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
lightnvm: use constant name instead of value
There is a constant to refer to free blocks. Use it when marking bad blocks instead of using a constant value Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
eb00352b52
commit
98379a12c5
@ -279,7 +279,7 @@ static int gen_block_bb(struct gen_dev *gn, struct ppa_addr ppa,
|
||||
lun = &gn->luns[(dev->luns_per_chnl * ppa.g.ch) + ppa.g.lun];
|
||||
|
||||
for (i = 0; i < nr_blks; i++) {
|
||||
if (blks[i] == 0)
|
||||
if (blks[i] == NVM_BLK_T_FREE)
|
||||
continue;
|
||||
|
||||
blk = &lun->vlun.blocks[i];
|
||||
|
Loading…
Reference in New Issue
Block a user