[sheepdog] [PATCH 8/9] store/plain: unlink temporary files when create_and_write fails
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Sep 17 01:00:01 CEST 2012
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/plain_store.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sheep/plain_store.c b/sheep/plain_store.c
index cb2776c..5a12278 100644
--- a/sheep/plain_store.c
+++ b/sheep/plain_store.c
@@ -362,6 +362,8 @@ int default_create_and_write(uint64_t oid, struct siocb *iocb)
dprintf("%"PRIx64"\n", oid);
ret = SD_RES_SUCCESS;
out:
+ if (ret != SD_RES_SUCCESS)
+ unlink(tmp_path);
close(fd);
return ret;
}
--
1.7.2.5
More information about the sheepdog
mailing list