diff options
| author | Kaho Ng <ngkaho1234@gmail.com> | 2016-04-27 19:11:31 +0800 |
|---|---|---|
| committer | Kaho Ng <ngkaho1234@gmail.com> | 2016-04-30 16:18:00 +0800 |
| commit | 8281a97813ef19452be1ce6ec1a6c40e483f12f1 (patch) | |
| tree | 46fe725d3b7de77cc98268b2d571a6fa45f37550 /src/ext4_balloc.c | |
| parent | 2a5abdbf8c1375f83edde31831cd8b0bb36bc6d8 (diff) | |
ext4_journal: numorous changes.
- Do not utilize jbd_block_rec::buf because it can be unreliable that
jbd_block_rec::buf may be freed.
- Do not need to flush buffers before a new transaction is going to reference
them.
- add some comments to the changes.
Diffstat (limited to 'src/ext4_balloc.c')
| -rw-r--r-- | src/ext4_balloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ext4_balloc.c b/src/ext4_balloc.c index 4b17c29..73f5631 100644 --- a/src/ext4_balloc.c +++ b/src/ext4_balloc.c @@ -225,7 +225,9 @@ int ext4_balloc_free_block(struct ext4_inode_ref *inode_ref, ext4_fsblk_t baddr) } ext4_bcache_invalidate_lba(fs->bdev->bc, baddr, 1); /* Release block group reference */ - return ext4_fs_put_block_group_ref(&bg_ref); + rc = ext4_fs_put_block_group_ref(&bg_ref); + + return rc; } int ext4_balloc_free_blocks(struct ext4_inode_ref *inode_ref, @@ -342,6 +344,7 @@ int ext4_balloc_free_blocks(struct ext4_inode_ref *inode_ref, ext4_bcache_invalidate_lba(fs->bdev->bc, first, count); /*All blocks should be released*/ ext4_assert(count == 0); + return rc; } |
