]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ebofs: fix memory leakage
authorSage Weil <sage@newdream.net>
Mon, 16 Jun 2008 18:38:36 +0000 (11:38 -0700)
committerSage Weil <sage@newdream.net>
Mon, 16 Jun 2008 18:38:36 +0000 (11:38 -0700)
src/ebofs/Ebofs.cc
src/ebofs/Ebofs.h

index 5a79e4ebffc8c6a4b3aec0ff215966fa16d9f12a..bd50c1ebaffa1fe0cfd5ef70a32e9b52e8381dd9 100644 (file)
@@ -1348,13 +1348,13 @@ void Ebofs::trim_buffer_cache()
   ebofs_lock.Unlock();
 }
 
-void Ebofs::trim_bc(__u64 max)
+void Ebofs::trim_bc(__s64 max)
 {
   if (max < 0)
     max = g_conf.ebofs_bc_size;
   dout(10) << "trim_bc start: size " << bc.get_size() << ", trimmable " << bc.get_trimmable() << ", max " << max << dendl;
 
-  while (bc.get_size() > max &&
+  while (bc.get_size() > (__u64)max &&
          bc.get_trimmable()) {
     BufferHead *bh = (BufferHead*) bc.lru_rest.lru_expire();
     if (!bh) break;
index 2ae263d69d5c5ba329a8e1628fc1348c4ed6c25f..945487ece4884dea6639cbff94132bff980e14b2 100644 (file)
@@ -179,7 +179,7 @@ protected:
 
   version_t trigger_commit();
   void commit_bc_wait(version_t epoch);
-  void trim_bc(__u64 max = -1);
+  void trim_bc(__s64 max = -1);
 
  public:
   void kick_idle();