bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
authorColy Li <colyli@suse.de>
Thu, 1 Oct 2020 06:50:45 +0000 (14:50 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 2 Oct 2020 20:25:29 +0000 (14:25 -0600)
commit17e4aed8309ff28670271546c2c3263eb12f5eb6
tree01a49fc3eea34328a4c364eee2aa4ce7a70c0230
parent84e5d1363cd8128820434cdb983ecab0f5c1b078
bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()

The parameter 'int n' from bch_bucket_alloc_set() is not cleared
defined. From the code comments n is the number of buckets to alloc, but
from the code itself 'n' is the maximum cache to iterate. Indeed all the
locations where bch_bucket_alloc_set() is called, 'n' is alwasy 1.

This patch removes the confused and unnecessary 'int n' from parameter
list of  bch_bucket_alloc_set(), and explicitly allocates only 1 bucket
for its caller.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/alloc.c
drivers/md/bcache/bcache.h
drivers/md/bcache/btree.c
drivers/md/bcache/super.c