Commit 4e7de35
btrfs: be a bit more careful when setting mirror_num_ret in btrfs_map_block
The mirror_num_ret is allowed to be NULL, although it has to be set when
smap is set. Unfortunately that is not a well enough specifiable
invariant for static type checkers, so add a NULL check to make sure they
are fine.
Fixes: 03793cb ("btrfs: add fast path for single device io in __btrfs_map_block")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent b19c98f commit 4e7de35
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6398 | 6398 | | |
6399 | 6399 | | |
6400 | 6400 | | |
6401 | | - | |
| 6401 | + | |
| 6402 | + | |
6402 | 6403 | | |
6403 | 6404 | | |
6404 | 6405 | | |
| |||
0 commit comments