On Thu, 2023-11-02 at 18:15 -0400, Benjamin Marzinski wrote: > When paths are allocated their size is initialized to 0. If they've > already set a size, and a future call to sysfs_get_size() fails > during > the parsing, assume that the size hasn't changed, instead of setting > it > to 0. All other failures in sysfs_get_size() already retain the > existing > size. > > Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> > --- > libmultipath/sysfs.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c > index c45296af..ad3d6612 100644 > --- a/libmultipath/sysfs.c > +++ b/libmultipath/sysfs.c > @@ -175,7 +175,6 @@ sysfs_get_size (struct path *pp, unsigned long > long * size) > > if (r != 1) { > condlog(3, "%s: Cannot parse size attribute", pp- > >dev); > - *size = 0; > return 1; > } >