mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 04:11:49 +00:00
bcache: fix error return value in memory shrink
In bch_mca_scan(), the return value should not be the number of freed btree nodes, but the number of pages of freed btree nodes. Signed-off-by: Tang Junhui <tang.junhui@zte.com.cn> Reviewed-by: Michael Lyle <mlyle@lyle.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
688892b3bc
commit
f3641c3abd
@ -719,7 +719,7 @@ static unsigned long bch_mca_scan(struct shrinker *shrink,
|
||||
}
|
||||
out:
|
||||
mutex_unlock(&c->bucket_lock);
|
||||
return freed;
|
||||
return freed * c->btree_pages;
|
||||
}
|
||||
|
||||
static unsigned long bch_mca_count(struct shrinker *shrink,
|
||||
|
Loading…
Reference in New Issue
Block a user