Skip to content

Commit

Permalink
ext4: remove set but rewrite variables
Browse files Browse the repository at this point in the history
In the ext4_dx_add_entry function, the at variable is assigned but will
reset just after “again:” label. So delete the unnecessary assignment.
this will not chang the logic.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Link: https://lore.kernel.org/r/1621493752-36890-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Tian Tao authored and Theodore Ts'o committed Jun 23, 2021
1 parent fd7b23b commit b2d2e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2499,7 +2499,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,

/* Which index block gets the new entry? */
if (at - entries >= icount1) {
frame->at = at = at - entries - icount1 + entries2;
frame->at = at - entries - icount1 + entries2;
frame->entries = entries = entries2;
swap(frame->bh, bh2);
}
Expand Down

0 comments on commit b2d2e75

Please sign in to comment.