diff options
author | Coly Li <colyli@suse.de> | 2020-10-01 08:50:45 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-02 22:25:29 +0200 |
commit | 17e4aed8309ff28670271546c2c3263eb12f5eb6 (patch) | |
tree | 01a49fc3eea34328a4c364eee2aa4ce7a70c0230 /drivers/md/bcache/bcache.h | |
parent | bcache: Convert to DEFINE_SHOW_ATTRIBUTE (diff) | |
download | linux-17e4aed8309ff28670271546c2c3263eb12f5eb6.tar.xz linux-17e4aed8309ff28670271546c2c3263eb12f5eb6.zip |
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>
Diffstat (limited to 'drivers/md/bcache/bcache.h')
-rw-r--r-- | drivers/md/bcache/bcache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index 4fd03d2496d8..5ff6e9573935 100644 --- a/drivers/md/bcache/bcache.h +++ b/drivers/md/bcache/bcache.h @@ -994,9 +994,9 @@ void bch_bucket_free(struct cache_set *c, struct bkey *k); long bch_bucket_alloc(struct cache *ca, unsigned int reserve, bool wait); int __bch_bucket_alloc_set(struct cache_set *c, unsigned int reserve, - struct bkey *k, int n, bool wait); + struct bkey *k, bool wait); int bch_bucket_alloc_set(struct cache_set *c, unsigned int reserve, - struct bkey *k, int n, bool wait); + struct bkey *k, bool wait); bool bch_alloc_sectors(struct cache_set *c, struct bkey *k, unsigned int sectors, unsigned int write_point, unsigned int write_prio, bool wait); |