From 69f31501a9e4d445c12e7330b4be9327ce8e4cec Mon Sep 17 00:00:00 2001 From: wangzhengyong Date: Tue, 14 Mar 2017 17:09:32 +0800 Subject: [PATCH] os/kstore: some error handling Signed-off-by: wangzhengyong@cmss.chinamobile.com --- src/os/kstore/KStore.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index 5ef2de6f8d3..fc7e9e4823b 100755 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -3186,6 +3186,8 @@ int KStore::_clone_range(TransContext *txc, goto out; r = _do_write(txc, newo, dstoff, bl.length(), bl, 0); + if (r < 0) + goto out; txc->write_onode(newo); -- 2.39.5