Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2017 19:14:33 +0000 (UTC)
From:      Fedor Uporov <fsu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324961 - head/sys/fs/ext2fs
Message-ID:  <201710241914.v9OJEXYV013931@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fsu
Date: Tue Oct 24 19:14:33 2017
New Revision: 324961
URL: https://svnweb.freebsd.org/changeset/base/324961

Log:
  Do not free bufs in case of extents metadata blocks + remove unneeded asserts.
  
  Approved by:    pfg (mentor)
  MFC after:      6 months

Modified:
  head/sys/fs/ext2fs/ext2_extents.c

Modified: head/sys/fs/ext2fs/ext2_extents.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_extents.c	Tue Oct 24 17:14:53 2017	(r324960)
+++ head/sys/fs/ext2fs/ext2_extents.c	Tue Oct 24 19:14:33 2017	(r324961)
@@ -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 ibl
 	}
 
 	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_
 			/* 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, 
 		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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710241914.v9OJEXYV013931>