]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rbd: make group_snap_list return error if it failed
authorMykola Golub <mgolub@suse.com>
Fri, 16 Jul 2021 09:34:28 +0000 (10:34 +0100)
committerN Balachandran <nibalach@redhat.com>
Wed, 24 Jul 2024 05:43:34 +0000 (11:13 +0530)
Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: N Balachandran <nibalach@redhat.com>
src/cls/rbd/cls_rbd.cc

index 255220d6b72fa3c96e99bd5c15feac75a537db29..dd309f6f2d8b1397265d154356152e23476ffb22 100644 (file)
@@ -7566,7 +7566,10 @@ int group_snap_list(cls_method_context_t hctx,
     return -EINVAL;
   }
   std::vector<cls::rbd::GroupSnapshot> group_snaps;
-  group::snap_list(hctx, start_after, max_return, &group_snaps);
+  int r = group::snap_list(hctx, start_after, max_return, &group_snaps);
+  if (r < 0) {
+    return r;
+  }
 
   encode(group_snaps, *out);