projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5775e21
)
bcache: Minor btree cache fix
author
Kent Overstreet
<kmo@daterainc.com>
Tue, 10 Dec 2013 21:24:26 +0000
(13:24 -0800)
committer
Kent Overstreet
<kmo@daterainc.com>
Wed, 8 Jan 2014 21:05:07 +0000
(13:05 -0800)
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/btree.c
patch
|
blob
|
history
diff --git
a/drivers/md/bcache/btree.c
b/drivers/md/bcache/btree.c
index
946ecd3
..
aaa87b3
100644
(file)
--- a/
drivers/md/bcache/btree.c
+++ b/
drivers/md/bcache/btree.c
@@
-714,14
+714,10
@@
static unsigned long bch_mca_scan(struct shrinker *shrink,
}
}
- /*
- * Can happen right when we first start up, before we've read in any
- * btree nodes
- */
- if (list_empty(&c->btree_cache))
- goto out;
-
for (i = 0; (nr--) && i < c->bucket_cache_used; i++) {
+ if (list_empty(&c->btree_cache))
+ goto out;
+
b = list_first_entry(&c->btree_cache, struct btree, list);
list_rotate_left(&c->btree_cache);