bcachefs: remove dead whiteout_u64s argument.

Signed-off-by: Olexa Bilaniuk <obilaniu@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Olexa Bilaniuk 2022-08-15 14:20:22 -04:00 committed by Kent Overstreet
parent 9375fbc200
commit efa8a7014d

View File

@ -773,8 +773,7 @@ static int bset_key_invalid(struct bch_fs *c, struct btree *b,
}
static int validate_bset_keys(struct bch_fs *c, struct btree *b,
struct bset *i, unsigned *whiteout_u64s,
int write, bool have_retry)
struct bset *i, int write, bool have_retry)
{
unsigned version = le16_to_cpu(i->version);
struct bkey_packed *k, *prev = NULL;
@ -910,7 +909,7 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca,
}
while (b->written < (ptr_written ?: btree_sectors(c))) {
unsigned sectors, whiteout_u64s = 0;
unsigned sectors;
struct nonce nonce;
struct bch_csum csum;
bool first = !b->written;
@ -979,8 +978,7 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca,
if (!b->written)
btree_node_set_format(b, b->data->format);
ret = validate_bset_keys(c, b, i, &whiteout_u64s,
READ, have_retry);
ret = validate_bset_keys(c, b, i, READ, have_retry);
if (ret)
goto fsck_err;
@ -1006,11 +1004,8 @@ int bch2_btree_node_read_done(struct bch_fs *c, struct bch_dev *ca,
if (blacklisted && !first)
continue;
sort_iter_add(iter, i->start,
vstruct_idx(i, whiteout_u64s));
sort_iter_add(iter,
vstruct_idx(i, whiteout_u64s),
vstruct_idx(i, 0),
vstruct_last(i));
nonblacklisted_written = b->written;
@ -1740,7 +1735,6 @@ static void btree_node_write_endio(struct bio *bio)
static int validate_bset_for_write(struct bch_fs *c, struct btree *b,
struct bset *i, unsigned sectors)
{
unsigned whiteout_u64s = 0;
struct printbuf buf = PRINTBUF;
int ret;
@ -1753,7 +1747,7 @@ static int validate_bset_for_write(struct bch_fs *c, struct btree *b,
if (ret)
return ret;
ret = validate_bset_keys(c, b, i, &whiteout_u64s, WRITE, false) ?:
ret = validate_bset_keys(c, b, i, WRITE, false) ?:
validate_bset(c, NULL, b, i, b->written, sectors, WRITE, false);
if (ret) {
bch2_inconsistent_error(c);