ftl: check outstanding flags in ftl_seek()
This commit is contained in:
parent
52a7ec1fae
commit
dddba0af8f
1 changed files with 1 additions and 2 deletions
|
@ -79,7 +79,6 @@ static int ftl_seek(struct ftl_map *map, uint32_t va)
|
|||
{
|
||||
size_t len;
|
||||
uint32_t offset, dst, src;
|
||||
int ret;
|
||||
|
||||
if (va >= ftl_get_capacity(map))
|
||||
return -1;
|
||||
|
@ -100,7 +99,7 @@ static int ftl_seek(struct ftl_map *map, uint32_t va)
|
|||
src = map->outstanding.page << map->log2_page_size;
|
||||
len = offset - map->offset;
|
||||
|
||||
if (ret == -ERR_NOT_FOUND)
|
||||
if (map->outstanding.flags & FTL_NO_MAPPING)
|
||||
flash_write0(map->dev, dst, len);
|
||||
else
|
||||
flash_copy(map->dev, dst, src, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue