summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-12-01 23:11:53 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:48 -0400
commit3eb26d0157781c262a85f13c20de92889f1a2a8f (patch)
treed81d9c3b847b69f257db02f42e4f1e06e025b360 /fs/bcachefs/fs-io.c
parentec3d21a9f25d495e0b6042a25f27cc711390195b (diff)
bcachefs: bch2_trans_get_iter() no longer returns errors
Since we now always preallocate the maximum number of iterators when we initialize a btree transaction, getting an iterator never fails - we can delete a fair amount of error path code. This patch also simplifies the iterator allocation code a bit. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index 9c3b11f414b5e..4dafe2be0a44d 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -2489,10 +2489,7 @@ static long bchfs_fcollapse_finsert(struct bch_inode_info *inode,
src = bch2_trans_get_iter(&trans, BTREE_ID_EXTENTS,
POS(inode->v.i_ino, src_start >> 9),
BTREE_ITER_INTENT);
- BUG_ON(IS_ERR_OR_NULL(src));
-
dst = bch2_trans_copy_iter(&trans, src);
- BUG_ON(IS_ERR_OR_NULL(dst));
while (1) {
struct disk_reservation disk_res =