diff options
author | Tang Junhui <tang.junhui@zte.com.cn> | 2018-03-19 01:36:22 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-03-19 03:15:20 +0100 |
commit | ca71df31661a0518ed58a1a59cf1993962153ebb (patch) | |
tree | b1804803052dbad87886ce0284a93369fa915f7a /net/caif | |
parent | bcache: fix error return value in memory shrink (diff) | |
download | linux-ca71df31661a0518ed58a1a59cf1993962153ebb.tar.xz linux-ca71df31661a0518ed58a1a59cf1993962153ebb.zip |
bcache: fix using of loop variable in memory shrink
In bch_mca_scan(), There are some confusion and logical error in the use of
loop variables. In this patch, we clarify them as:
1) nr: the number of btree nodes needs to scan, which will decrease after
we scan a btree node, and should not be less than 0;
2) i: the number of btree nodes have scanned, includes both
btree_cache_freeable and btree_cache, which should not be bigger than
btree_cache_used;
3) freed: the number of btree nodes have freed.
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>
Diffstat (limited to 'net/caif')
0 files changed, 0 insertions, 0 deletions