Skip to content

Commit 50607b5

Browse files
ColinIanKingjankara
authored andcommitted
ext2: remove redundant assignment to variable desc and variable best_desc
Variable desc is being assigned a value that is never read, the exit via label found immeditely returns with no access to desc. The assignment is redundant and can be removed. Also remove variable best_desc since this is not used. Cleans up clang scan muild warning: fs/ext2/ialloc.c:297:4: warning: Value stored to 'desc' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230630165458.166238-1-colin.i.king@gmail.com>
1 parent a901a35 commit 50607b5

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

fs/ext2/ialloc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
273273

274274
if ((parent == d_inode(sb->s_root)) ||
275275
(EXT2_I(parent)->i_flags & EXT2_TOPDIR_FL)) {
276-
struct ext2_group_desc *best_desc = NULL;
277276
int best_ndir = inodes_per_group;
278277
int best_group = -1;
279278

@@ -291,10 +290,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
291290
continue;
292291
best_group = group;
293292
best_ndir = le16_to_cpu(desc->bg_used_dirs_count);
294-
best_desc = desc;
295293
}
296294
if (best_group >= 0) {
297-
desc = best_desc;
298295
group = best_group;
299296
goto found;
300297
}

0 commit comments

Comments
 (0)