summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngkaho1234 <ngkaho1234@gmail.com>2015-12-28 13:15:26 +0000
committergkostka <kostka.grzegorz@gmail.com>2015-12-28 14:28:55 +0100
commit3424e6d5c6ee304984d05a62f70cdb40a66274b1 (patch)
tree46577b73223bd762c4e696c98f80d97189050a8f
parentfbc87b38d6c36aeec6bae1c67752e1f059953f20 (diff)
ext4_bcache: remove buffer from LRU tree when it will be dropped.
-rw-r--r--lwext4/ext4_bcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lwext4/ext4_bcache.c b/lwext4/ext4_bcache.c
index a8b1855..628735a 100644
--- a/lwext4/ext4_bcache.c
+++ b/lwext4/ext4_bcache.c
@@ -163,10 +163,10 @@ void ext4_bcache_drop_buf(struct ext4_bcache *bc, struct ext4_buf *buf)
ext4_dbg(DEBUG_BCACHE, DBG_WARN "Buffer is still referenced. "
"lba: %" PRIu64 ", refctr: %" PRIu32 "\n",
buf->lba, buf->refctr);
- }
+ } else
+ RB_REMOVE(ext4_buf_lru, &bc->lru_root, buf);
RB_REMOVE(ext4_buf_lba, &bc->lba_root, buf);
- RB_REMOVE(ext4_buf_lru, &bc->lru_root, buf);
/*Forcibly drop dirty buffer.*/
if (ext4_bcache_test_flag(buf, BC_DIRTY))