librbd/trash: don't return -ENOENT error from move state machine

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2021-03-10 15:37:39 -05:00
parent c808abea64
commit f6ed98d682

View 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;
}