From: xie xingguo Date: Thu, 3 Nov 2016 03:18:25 +0000 (+0800) Subject: os/bluestore: drop redundant boundary check X-Git-Tag: v11.1.0~439^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69b8e4d55a6f7a831d1bc1210b3ead0d80fb8ce2;p=ceph.git os/bluestore: drop redundant boundary check As we have done the sanity check ahead. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 11ecbf5d35ca..78c0b5ea7371 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -549,10 +549,7 @@ void BlueStore::Cache::trim( return; } - uint64_t need_to_free = 0; - if (current > target_bytes) { - need_to_free = current - target_bytes; - } + uint64_t need_to_free = current - target_bytes; uint64_t free_buffer = 0; uint64_t free_meta = 0; if (current_buffer > target_buffer) {