]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: finish the pc in importing even if from_stdin.
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Fri, 29 Jul 2016 02:24:54 +0000 (22:24 -0400)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Sun, 19 Feb 2017 12:41:28 +0000 (20:41 +0800)
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
src/tools/rbd/action/Import.cc

index 5b99e77d507ac61d917ed12a29e87a65adeb461d..0a01411de9335d930cd31b3a04fad722d781b1a5 100644 (file)
@@ -205,13 +205,11 @@ err:
   if (r < 0)
     rbd.remove(io_ctx, imgname);
 done:
-  if (!from_stdin) {
-    if (r < 0)
-      pc.fail();
-    else
-      pc.finish();
-    close(fd);
-  }
+  if (r < 0)
+    pc.fail();
+  else
+    pc.finish();
+  close(fd);
 done2:
   delete[] p;
   return r;