aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ext2fs
diff options
context:
space:
mode:
authorFedor Uporov <fsu@FreeBSD.org>2017-10-24 19:14:33 +0000
committerFedor Uporov <fsu@FreeBSD.org>2017-10-24 19:14:33 +0000
commitf0a993bbdba79529fcd2009d247a85a6108d51a1 (patch)
tree8414d7eee1037dda4e00bec23d06384e9c1d92dc /sys/fs/ext2fs
parent3a757e5403966b1b3f85ec0c598f547c67e0d33f (diff)
downloadsrc-f0a993bbdba79529fcd2009d247a85a6108d51a1.tar.gz
src-f0a993bbdba79529fcd2009d247a85a6108d51a1.zip
Do not free bufs in case of extents metadata blocks + remove unneeded asserts.
Approved by: pfg (mentor) MFC after: 6 months
Notes
Notes: svn path=/head/; revision=324961
Diffstat (limited to 'sys/fs/ext2fs')
-rw-r--r--sys/fs/ext2fs/ext2_extents.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c
index c7bd74a44cda..b9910c0c2661 100644
--- a/sys/fs/ext2fs/ext2_extents.c
+++ b/sys/fs/ext2fs/ext2_extents.c
@@ -420,7 +420,7 @@ ext4_ext_find_extent(struct inode *ip, daddr_t block,
}
ext4_ext_fill_path_bdata(&path[ppos], bp, blk);
- brelse(bp);
+ bqrelse(bp);
eh = ext4_ext_block_header(path[ppos].ep_data);
error = ext4_ext_check_header(ip, eh);
@@ -1228,7 +1228,7 @@ ext4_ext_get_blocks(struct inode *ip, e4fs_daddr_t iblk,
}
if ((ex = path[depth].ep_ext)) {
- uint64_t lblk = ex->e_blk;
+ uint64_t lblk = ex->e_blk;
uint16_t e_len = ex->e_len;
e4fs_daddr_t e_start = ext4_ext_extent_pblock(ex);
@@ -1397,9 +1397,6 @@ ext4_ext_rm_leaf(struct inode *ip, struct ext4_extent_path *path,
/* Remove whole extent. */
block = ex_blk;
num = 0;
- KASSERT(a == ex_blk, ("ext4_ext_rm_leaf: bad a"));
- KASSERT(b != ex_blk + ex_len - 1,
- ("ext4_ext_rm_leaf: bad b"));
}
if (ex == EXT_FIRST_EXTENT(eh))
@@ -1508,7 +1505,7 @@ ext4_ext_remove_space(struct inode *ip, off_t length, int flags,
return (error);
path = malloc(sizeof(struct ext4_extent_path) * (depth + 1),
- M_EXT2EXTENTS, M_WAITOK | M_ZERO);
+ M_EXT2EXTENTS, M_WAITOK | M_ZERO);
if (!path)
return (ENOMEM);