]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/trash: don't return -ENOENT error from move state machine
authorJason Dillaman <dillaman@redhat.com>
Wed, 10 Mar 2021 20:37:39 +0000 (15:37 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 11 Mar 2021 15:48:05 +0000 (10:48 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/trash/MoveRequest.cc

index 82b81fa3863b8fed32e0e5600bba58f278c98e3e..7b7abe452fbd5fa25da7c1a72e0f5e6853f23643 100644 (file)
@@ -101,7 +101,10 @@ template <typename I>
 void MoveRequest<I>::handle_directory_remove(int r) {
   ldout(m_cct, 10) << "r=" << r << dendl;
 
-  if (r < 0 && r != -ENOENT) {
+  if (r == -ENOENT) {
+    r = 0;
+  }
+  if (r < 0) {
     lderr(m_cct) << "failed to remove image from directory: " << cpp_strerror(r)
                  << dendl;
   }