]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix signed/unsigned mismatch warning during building 22064/head
authorIgor Fedotov <ifedotov@suse.com>
Thu, 17 May 2018 15:05:37 +0000 (18:05 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Fri, 18 May 2018 16:13:59 +0000 (19:13 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/BitMapAllocator.cc

index f9601939f53718bdbae2e67001c2fcaebc9a7a39..1857879bffd75821f1df52818517f27555a55357 100644 (file)
@@ -113,7 +113,7 @@ int64_t BitMapAllocator::allocate(
   auto res = allocate_dis(want_size, alloc_unit / m_block_size,
                       max_alloc_size, hint / m_block_size, extents);
 
-  if (res < want_size) {
+  if (res > 0 && res < static_cast<int64_t>(want_size)) {
     auto unused = want_size - res;
     int nblks = unused / m_block_size;
     assert(!(unused % m_block_size));