Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0f32a56 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcache: Minor btree cache fix

parent 5775e213
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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
	 */
	for (i = 0; (nr--) && i < c->bucket_cache_used; i++) {
		if (list_empty(&c->btree_cache))
			goto out;

	for (i = 0; (nr--) && i < c->bucket_cache_used; i++) {
		b = list_first_entry(&c->btree_cache, struct btree, list);
		list_rotate_left(&c->btree_cache);