diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-19 15:08:00 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:14 -0400 |
commit | 9a796fdb06b56a1811f1afdd40b793e2848a990e (patch) | |
tree | 0aff8322804e52e2eb7f078bb0688a5d2fda4462 /fs/bcachefs/ec.c | |
parent | d355c6f4f73060c8f3eba95b9ae72929669f7516 (diff) |
bcachefs: bch2_trans_exit() no longer returns errors
Now that peek_node()/next_node() are converted to return errors
directly, we don't need bch2_trans_exit() to return errors - it's
cleaner this way and wasn't used much anymore.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r-- | fs/bcachefs/ec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index 2c538f9b54f8..7dfa052e9765 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -1670,11 +1670,12 @@ int bch2_ec_mem_alloc(struct bch_fs *c, bool gc) bch2_trans_iter_init(&trans, &iter, BTREE_ID_stripes, POS(0, U64_MAX), 0); k = bch2_btree_iter_prev(&iter); - if (!IS_ERR_OR_NULL(k.k)) + ret = bkey_err(k); + if (!ret && k.k) idx = k.k->p.offset + 1; bch2_trans_iter_exit(&trans, &iter); - ret = bch2_trans_exit(&trans); + bch2_trans_exit(&trans); if (ret) return ret; |