mufs: mufs_free_block() trim block before freeing
This commit is contained in:
parent
f4b08bb89f
commit
88707097fb
1 changed files with 3 additions and 0 deletions
|
@ -64,5 +64,8 @@ int mufs_alloc_block(struct mufs *fs, uint32_t *found)
|
|||
|
||||
int mufs_free_block(struct mufs *fs, uint32_t block)
|
||||
{
|
||||
flash_erase(fs->dev, (1 + block) << fs->dev->log2_block_size,
|
||||
1 << fs->dev->log2_block_size);
|
||||
|
||||
return mufs_mark_block(fs, block, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue