]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: simplify comaparison
authorDhairya Parmar <dparmar@redhat.com>
Mon, 17 Mar 2025 14:55:58 +0000 (20:25 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Thu, 19 Feb 2026 04:46:02 +0000 (10:16 +0530)
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py

index c07d7bcfc27d1ea51a07e91caa7c2aa347aec291..edf7d485b51639fcaef570fda3737c9ee0e40e0f 100644 (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. "