Skip to content

Commit

Permalink
Merge PR #19277 into master
Browse files Browse the repository at this point in the history
* refs/pull/19277/head:
	cephfs: potential adjust failure in lru_expire

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
  • Loading branch information
batrick committed Dec 18, 2017
2 parents 43b8841 + 590c39e commit 62d2e2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/include/lru.h
Expand Up @@ -157,14 +157,14 @@ class LRU {

// expire -- expire a single item
LRUObject *lru_get_next_expire() {
adjust();
// look through tail of bot
while (bottom.size()) {
LRUObject *p = bottom.back();
if (!p->lru_pinned) return p;

// move to pintail
pintail.push_front(&p->lru_link);
adjust();
}

// ok, try head then
Expand All @@ -174,7 +174,6 @@ class LRU {

// move to pintail
pintail.push_front(&p->lru_link);
adjust();
}

// no luck!
Expand Down

0 comments on commit 62d2e2e

Please sign in to comment.