[sheepdog] [PATCH] sheep: correct error code of vdi deletion
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Jan 6 11:37:25 CET 2014
The previous refactoring commit (5e460b4d64441) broke QA 016. This
patch fixes the problem.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/vdi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sheep/vdi.c b/sheep/vdi.c
index ff35e92..6239277 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -1113,6 +1113,8 @@ static int start_deletion(struct request *req, uint32_t vid)
* if the VDI is a cloned VDI, delete its objects
* no matter whether the VDI tree is clear.
*/
+ ret = SD_RES_SUCCESS;
+
if (cloned) {
di->delete_vid_array[0] = vid;
di->delete_vid_count = 1;
@@ -1120,7 +1122,6 @@ static int start_deletion(struct request *req, uint32_t vid)
sd_debug("snapshot chain has valid vdi, just mark vdi %"
PRIx32 " as deleted.", di->target_vid);
delete_inode(di->target_vid);
- ret = SD_RES_SUCCESS;
goto out;
}
}
--
1.7.10.4
More information about the sheepdog
mailing list