From 0ccde6eca306e5c597e668c3bd6f2f37bf509af4 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 14 Oct 2016 15:13:02 +0800 Subject: [PATCH] os/filestore: fix potential result code overwriting Signed-off-by: xie xingguo --- src/os/filestore/FileStore.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 279caa41d5247..dd278c2e0e15c 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -3813,6 +3813,8 @@ int FileStore::_move_ranges_destroy_src(const coll_t& src_cid, const ghobject_t& uint64_t len = move_info[i].get<2>(); r = _do_clone_range(**t, **b, srcoff, len, dstoff); + if (r < 0) + break; } dout(10) << __func__ << cid << "/" << oid << " " << " = " << r << dendl; -- 2.39.5