]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: Enforces the methods lru_pin() and lru_unpin() 1951/head
authorSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Wed, 11 Jun 2014 13:40:38 +0000 (15:40 +0200)
committerSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Mon, 16 Jun 2014 13:54:57 +0000 (15:54 +0200)
commitd93e74e7e7bd08d9f09d06bd19a2a8b77d1da5b4
treea6b5c9e8e1fa856523fd8adc13eb978c5bf8d3a6
parentd48ed68a709d17b9e48467a7a0117c6ead05411a
common: Enforces the methods lru_pin() and lru_unpin()

If lru_*pin() is called twice, the counter will be incr/decr
incorrectly since it will count more/less pinned objects than
there is and so corrupts the balancing (lru_adjust()).

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
src/include/lru.h
src/test/common/test_lru.cc