lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Aug 2015 18:22:18 +0200
From:	Jan Kara <jack@...e.com>
To:	linux-ext4@...r.kernel.org
Cc:	Ted Tso <tytso@....edu>,
	"Darrick J. Wong" <darrick.wong@...cle.com>,
	Jan Kara <jack@...e.com>
Subject: [PATCH 03/21] resize2fs: Use ext2fs_allocate_group_table2()

Signed-off-by: Jan Kara <jack@...e.com>
---
 resize/resize2fs.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 041ff75029b2..df6fdf1de913 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -1482,8 +1482,10 @@ static errcode_t blocks_to_move(ext2_resize_t rfs)
 		    ext2fs_block_bitmap_loc(fs, i))
 			continue;
 
-		retval = ext2fs_allocate_group_table(fs, i,
-						     rfs->reserve_blocks);
+		retval = ext2fs_allocate_group_table2(fs, i,
+				rfs->reserve_blocks,
+				EXT2FS_ALLOC_TABLE_UPDATE_STATS |
+				EXT2FS_ALLOC_TABLE_SET_BLOCK_BITMAP);
 		if (retval)
 			goto errout;
 
@@ -1493,7 +1495,6 @@ static errcode_t blocks_to_move(ext2_resize_t rfs)
 		 */
 		if (ext2fs_block_bitmap_loc(old_fs, i) !=
 		    (blk = ext2fs_block_bitmap_loc(fs, i))) {
-			ext2fs_block_alloc_stats2(fs, blk, +1);
 			if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
 			    !ext2fs_test_block_bitmap2(meta_bmap, blk))
 				ext2fs_mark_block_bitmap2(rfs->move_blocks,
@@ -1501,7 +1502,6 @@ static errcode_t blocks_to_move(ext2_resize_t rfs)
 		}
 		if (ext2fs_inode_bitmap_loc(old_fs, i) !=
 		    (blk = ext2fs_inode_bitmap_loc(fs, i))) {
-			ext2fs_block_alloc_stats2(fs, blk, +1);
 			if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
 			    !ext2fs_test_block_bitmap2(meta_bmap, blk))
 				ext2fs_mark_block_bitmap2(rfs->move_blocks,
@@ -1527,7 +1527,6 @@ static errcode_t blocks_to_move(ext2_resize_t rfs)
 		 */
 		for (blk = ext2fs_inode_table_loc(fs, i), j=0;
 		     j < fs->inode_blocks_per_group ; j++, blk++) {
-			ext2fs_block_alloc_stats2(fs, blk, +1);
 			if (ext2fs_test_block_bitmap2(old_fs->block_map, blk) &&
 			    !ext2fs_test_block_bitmap2(meta_bmap, blk))
 				ext2fs_mark_block_bitmap2(rfs->move_blocks,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ