summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@mykernel.net>2019-11-04 19:40:34 +0800
committerJan Kara <jack@suse.cz>2019-11-07 12:35:27 +0100
commitac3820f8222b6563580605f427ff03474a2f003a (patch)
tree3c7f5a0f40c5bf7899ecb8066e4e5081dc5ae954
parentcf4eb321b3ad63248069a8038df126fcf9ed9100 (diff)
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(). Link: https://lore.kernel.org/r/20191104114036.9893-3-cgxu519@mykernel.net Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/ext2/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index b7a4d74dfde7..f3ff05edaf8c 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -684,7 +684,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)
@@ -701,6 +700,7 @@ repeat:
}
start = grp_goal;
+repeat:
if (ext2_set_bit_atomic(sb_bgl_lock(EXT2_SB(sb), group), grp_goal,
bitmap_bh->b_data)) {
/*