diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-04-30 16:48:21 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-04-30 18:23:38 -0400 |
commit | bb74624daa138837d04c2a9931723115b9b6d645 (patch) | |
tree | 8c2c310f0d08fc731f573d21f20494a87a686300 /libbcachefs/ec.c | |
parent | a14d39d7ac45eebe45ed0772d1ed837f15b15af4 (diff) |
Update bcachefs sources to a5c0e1bb30 bcachefs: Clean up bch2_btree_and_journal_walk()
Diffstat (limited to 'libbcachefs/ec.c')
-rw-r--r-- | libbcachefs/ec.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libbcachefs/ec.c b/libbcachefs/ec.c index 7062ab9c..fa7450d2 100644 --- a/libbcachefs/ec.c +++ b/libbcachefs/ec.c @@ -1630,26 +1630,22 @@ int bch2_stripes_write(struct bch_fs *c, unsigned flags) return ret; } -static int bch2_stripes_read_fn(struct bch_fs *c, enum btree_id id, - unsigned level, struct bkey_s_c k) +static int bch2_stripes_read_fn(struct bch_fs *c, struct bkey_s_c k) { int ret = 0; - if (k.k->type == KEY_TYPE_stripe) { + if (k.k->type == KEY_TYPE_stripe) ret = __ec_stripe_mem_alloc(c, k.k->p.offset, GFP_KERNEL) ?: bch2_mark_key(c, k, 0, 0, NULL, 0, BTREE_TRIGGER_NOATOMIC); - if (ret) - return ret; - } return ret; } -int bch2_stripes_read(struct bch_fs *c, struct journal_keys *journal_keys) +int bch2_stripes_read(struct bch_fs *c) { - int ret = bch2_btree_and_journal_walk(c, journal_keys, BTREE_ID_stripes, - NULL, bch2_stripes_read_fn); + int ret = bch2_btree_and_journal_walk(c, BTREE_ID_stripes, + bch2_stripes_read_fn); if (ret) bch_err(c, "error reading stripes: %i", ret); |