diff options
| author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-01-19 08:17:50 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-02-03 07:54:36 +0100 |
| commit | 57a4a863cda8b02dc0d46a36ec5cd5f86993b7aa (patch) | |
| tree | f88b1f90423a80e0575add89eb8513cc61f5ed00 /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | 2aef934b56b3ae07c292831cf9bf6bafcaaa005e (diff) | |
btrfs: remove bogus NULL checks in __btrfs_write_out_cache()
Dan reported a new smatch warning in free-space-cache.c:
New smatch warnings:
fs/btrfs/free-space-cache.c:1207 write_pinned_extent_entries() warn: variable dereferenced before check 'block_group' (see line 1203)
But the check if the block_group pointer is NULL is bogus, because to
get to this point block_group::io_ctl has already been dereferenced
further up the call-chain when calling __btrfs_write_out_cache() from
btrfs_write_out_cache().
Remove the bogus checks for block_group == NULL in
__btrfs_write_out_cache() and it's siblings.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202601170636.WsePMV5H-lkp@intel.com/
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
