~ubuntu-branches/ubuntu/precise/ceph/precise-proposed

« back to all changes in this revision

Viewing changes to src/include/lru.h

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2011-04-25 10:09:05 UTC
  • mfrom: (1.1.3 upstream) (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110425100905-exm7dfvi2v5ick02
Tags: 0.27-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <stdint.h>
21
21
 
22
 
#include "config.h"
 
22
#include "common/config.h"
23
23
 
24
24
 
25
25
 
227
227
    //if (!o->lru_in_lru) return o;  // might have expired and been removed that way.
228
228
    if (!o->lru) return o;
229
229
 
230
 
 
231
 
    if (o->lru_list == &lru_top)
232
 
      lru_top.remove(o);
233
 
    else if (o->lru_list == &lru_bot) 
234
 
      lru_bot.remove(o);
235
 
    else if (o->lru_list == &lru_pintail)
236
 
      lru_pintail.remove(o);
237
 
    else
238
 
      assert(0);
 
230
    assert((o->lru_list == &lru_pintail) ||
 
231
           (o->lru_list == &lru_top) ||
 
232
           (o->lru_list == &lru_bot));
 
233
    o->lru_list->remove(o);
239
234
 
240
235
    lru_num--;
241
236
    if (o->lru_pinned) lru_num_pinned--;