mgr/volumes: simplify comaparison

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
This commit is contained in:
Dhairya Parmar 2025-03-17 20:25:58 +05:30
parent efe11565b8
commit 15e5a9dc0b

View File

@ -426,7 +426,7 @@ class SubvolumeBase(object):
raise VolumeException(-e.args[0], e.args[1])
subvolstat = self.fs.stat(path)
if newsize > 0 and newsize < subvolstat.st_size:
if 0 < newsize < subvolstat.st_size:
if noshrink:
raise VolumeException(-errno.EINVAL,
"Can't resize the subvolume. "