diff options
| author | Kaho Ng <ngkaho1234@gmail.com> | 2017-06-22 02:26:19 +0800 |
|---|---|---|
| committer | Kaho Ng <ngkaho1234@gmail.com> | 2017-06-22 18:13:59 +0800 |
| commit | faa76ad23b0ce89d3f0f6bb53740fb47d42ca9f3 (patch) | |
| tree | 631c3400ed836a1885ec88495765ebaab09169b1 | |
| parent | 9b38aef3133341e68a40756bd9fba1b81edb203b (diff) | |
ext4_balloc: fix not invaliding cache correctly
We fix ext4_balloc_free_blocks() not invaliding cache
correctly according to start block and block count parameter
from caller.
| -rw-r--r-- | src/ext4_balloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ext4_balloc.c b/src/ext4_balloc.c index a308fbb..8e5e26c 100644 --- a/src/ext4_balloc.c +++ b/src/ext4_balloc.c @@ -235,6 +235,7 @@ int ext4_balloc_free_blocks(struct ext4_inode_ref *inode_ref, { int rc = EOK; uint32_t blk_cnt = count; + ext4_fsblk_t start_block = first; struct ext4_fs *fs = inode_ref->fs; struct ext4_sblock *sb = &fs->sb; @@ -341,7 +342,7 @@ int ext4_balloc_free_blocks(struct ext4_inode_ref *inode_ref, } - ext4_bcache_invalidate_lba(fs->bdev->bc, first, count); + ext4_bcache_invalidate_lba(fs->bdev->bc, start_block, blk_cnt); /*All blocks should be released*/ ext4_assert(count == 0); |
