diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2023-06-30 17:54:58 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-07-03 14:44:45 +0200 |
commit | 50607b514d8a9ed6c8c5c1c119158754f5f6ff17 (patch) | |
tree | 95a24bd52f03b779692edce0c22a2c1fb502be32 /fs/ext2 | |
parent | a901a3568fd26ca9c4a82d8bc5ed5b3ed844d451 (diff) | |
download | linux-stable-50607b514d8a9ed6c8c5c1c119158754f5f6ff17.tar.gz linux-stable-50607b514d8a9ed6c8c5c1c119158754f5f6ff17.tar.bz2 linux-stable-50607b514d8a9ed6c8c5c1c119158754f5f6ff17.zip |
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>
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/ialloc.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index a4e1d7a9c544..34cd5dc1da23 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c @@ -273,7 +273,6 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) if ((parent == d_inode(sb->s_root)) || (EXT2_I(parent)->i_flags & EXT2_TOPDIR_FL)) { - struct ext2_group_desc *best_desc = NULL; int best_ndir = inodes_per_group; int best_group = -1; @@ -291,10 +290,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) continue; best_group = group; best_ndir = le16_to_cpu(desc->bg_used_dirs_count); - best_desc = desc; } if (best_group >= 0) { - desc = best_desc; group = best_group; goto found; } |