mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
bcachefs: bch2_bkey_drop_ptrs() declares loop iter
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
b895c70326
commit
9a768ab75b
@ -1865,7 +1865,6 @@ static void btree_node_write_work(struct work_struct *work)
|
||||
container_of(work, struct btree_write_bio, work);
|
||||
struct bch_fs *c = wbio->wbio.c;
|
||||
struct btree *b = wbio->wbio.bio.bi_private;
|
||||
struct bch_extent_ptr *ptr;
|
||||
int ret = 0;
|
||||
|
||||
btree_bounce_free(c,
|
||||
|
@ -2491,7 +2491,6 @@ int bch2_btree_node_update_key_get_iter(struct btree_trans *trans,
|
||||
|
||||
BUG_ON(!btree_node_hashed(b));
|
||||
|
||||
struct bch_extent_ptr *ptr;
|
||||
bch2_bkey_drop_ptrs(bkey_i_to_s(new_key), ptr,
|
||||
!bch2_bkey_has_device(bkey_i_to_s(&b->key), ptr->dev));
|
||||
|
||||
|
@ -467,7 +467,6 @@ int bch2_extent_drop_ptrs(struct btree_trans *trans,
|
||||
|
||||
while (data_opts.kill_ptrs) {
|
||||
unsigned i = 0, drop = __fls(data_opts.kill_ptrs);
|
||||
struct bch_extent_ptr *ptr;
|
||||
|
||||
bch2_bkey_drop_ptrs(bkey_i_to_s(n), ptr, i++ == drop);
|
||||
data_opts.kill_ptrs ^= 1U << drop;
|
||||
|
@ -1200,7 +1200,7 @@ static int ec_stripe_update_extent(struct btree_trans *trans,
|
||||
struct btree_iter iter;
|
||||
struct bkey_s_c k;
|
||||
const struct bch_extent_ptr *ptr_c;
|
||||
struct bch_extent_ptr *ptr, *ec_ptr = NULL;
|
||||
struct bch_extent_ptr *ec_ptr = NULL;
|
||||
struct bch_extent_stripe_ptr stripe_ptr;
|
||||
struct bkey_i *n;
|
||||
int ret, dev, block;
|
||||
|
@ -838,8 +838,6 @@ union bch_extent_entry *bch2_bkey_drop_ptr(struct bkey_s k,
|
||||
|
||||
void bch2_bkey_drop_device(struct bkey_s k, unsigned dev)
|
||||
{
|
||||
struct bch_extent_ptr *ptr;
|
||||
|
||||
bch2_bkey_drop_ptrs(k, ptr, ptr->dev == dev);
|
||||
}
|
||||
|
||||
@ -974,8 +972,6 @@ void bch2_extent_ptr_set_cached(struct bkey_s k, struct bch_extent_ptr *ptr)
|
||||
*/
|
||||
bool bch2_extent_normalize(struct bch_fs *c, struct bkey_s k)
|
||||
{
|
||||
struct bch_extent_ptr *ptr;
|
||||
|
||||
bch2_bkey_drop_ptrs(k, ptr,
|
||||
ptr->cached &&
|
||||
ptr_stale(bch2_dev_bkey_exists(c, ptr->dev), ptr));
|
||||
|
@ -654,7 +654,7 @@ union bch_extent_entry *bch2_bkey_drop_ptr(struct bkey_s,
|
||||
do { \
|
||||
struct bkey_ptrs _ptrs = bch2_bkey_ptrs(_k); \
|
||||
\
|
||||
_ptr = &_ptrs.start->ptr; \
|
||||
struct bch_extent_ptr *_ptr = &_ptrs.start->ptr; \
|
||||
\
|
||||
while ((_ptr = bkey_ptr_next(_ptrs, _ptr))) { \
|
||||
if (_cond) { \
|
||||
|
@ -481,7 +481,6 @@ static void bch2_write_done(struct closure *cl)
|
||||
static noinline int bch2_write_drop_io_error_ptrs(struct bch_write_op *op)
|
||||
{
|
||||
struct keylist *keys = &op->insert_keys;
|
||||
struct bch_extent_ptr *ptr;
|
||||
struct bkey_i *src, *dst = keys->keys, *n;
|
||||
|
||||
for (src = keys->keys; src != keys->top; src = n) {
|
||||
|
Loading…
Reference in New Issue
Block a user