If a multipath device already has need_reload set when a path is
adopted, it won't call set_path_max_sectors_kb() because of
short-circuit evaluation. This isn't what's intended.

Fixes: e5e20c7b ("libmultipath: set max_sectors_kb in adopt_paths()")
Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com>
---
 libmultipath/structs_vec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index d22056ca..60051092 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -335,8 +335,7 @@ int adopt_paths(vector pathvec, struct multipath *mpp,
                                 */
                                if (!current_mpp ||
                                    !mp_find_path_by_devt(current_mpp, 
pp->dev_t))
-                                       mpp->need_reload = mpp->need_reload ||
-                                               set_path_max_sectors_kb(pp, 
mpp->max_sectors_kb);
+                                       mpp->need_reload = 
set_path_max_sectors_kb(pp, mpp->max_sectors_kb) || mpp->need_reload;
                        }
 
                        pp->mpp = mpp;
-- 
2.46.2


Reply via email to