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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  4 Nov 2019 19:40:34 +0800
From:   Chengguang Xu <cgxu519@...ernel.net>
To:     jack@...e.com
Cc:     linux-ext4@...r.kernel.org, Chengguang Xu <cgxu519@...ernel.net>
Subject: [PATCH 3/5] ext2: skip unnecessary operations in ext2_try_to_allocate()

Move 'repeat' tag to proper place so that we can
skip unnecessary operations in ext2_try_to_allocate().

Signed-off-by: Chengguang Xu <cgxu519@...ernel.net>
---
 fs/ext2/balloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 994a1fd18e93..a0c22e166682 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -696,7 +696,6 @@ ext2_try_to_allocate(struct super_block *sb, int group,
 
 	BUG_ON(start > EXT2_BLOCKS_PER_GROUP(sb));
 
-repeat:
 	if (grp_goal < 0) {
 		grp_goal = find_next_usable_block(start, bitmap_bh, end);
 		if (grp_goal < 0)
@@ -713,6 +712,7 @@ ext2_try_to_allocate(struct super_block *sb, int group,
 	}
 	start = grp_goal;
 
+repeat:
 	if (ext2_set_bit_atomic(sb_bgl_lock(EXT2_SB(sb), group), grp_goal,
 			       				bitmap_bh->b_data)) {
 		/*
-- 
2.20.1



Powered by blists - more mailing lists