ext4: remove set but rewrite variables
authorTian Tao <tiantao6@hisilicon.com>
Thu, 20 May 2021 06:55:52 +0000 (14:55 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 23 Jun 2021 01:34:17 +0000 (21:34 -0400)
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>
fs/ext4/namei.c

index a4af26d4459a3b947277d3c3f331f93b694840e1..5fd56f616cf0b6be7c83f1afdc99b86cfa4f46e6 100644 (file)
@@ -2499,7 +2499,7 @@ again:
 
                        /* 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);
                        }