mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
Cleanup: metaslab_alloc_dva() should not NULL check mg->mg_next
This is a circularly linked list. mg->mg_next can never be NULL. This caused 3 defect reports in Coverity. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14042
This commit is contained in:
parent
d953bcbf6b
commit
ef55679a75
@ -5131,8 +5131,7 @@ metaslab_alloc_dva(spa_t *spa, metaslab_class_t *mc, uint64_t psize,
|
||||
if (vd != NULL && vd->vdev_mg != NULL) {
|
||||
mg = vdev_get_mg(vd, mc);
|
||||
|
||||
if (flags & METASLAB_HINTBP_AVOID &&
|
||||
mg->mg_next != NULL)
|
||||
if (flags & METASLAB_HINTBP_AVOID)
|
||||
mg = mg->mg_next;
|
||||
} else {
|
||||
mg = mca->mca_rotor;
|
||||
|
Loading…
Reference in New Issue
Block a user