]> 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)
committerNathan Cutler <ncutler@suse.com>
Thu, 8 Apr 2021 13:03:23 +0000 (15:03 +0200)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f6ed98d682e562de1cad301696e918c52a4dba5d)

src/librbd/trash/MoveRequest.cc

index 526e92abca297487f1bda8f1f04057642de2a916..aa05fa63eb0b039be6193f9ce0e718984fd93264 100644 (file)
@@ -102,7 +102,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;
   }