diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-07-25 02:50:40 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:09 +0300 |
commit | 8b3e9bd65f61dde939538452cbb2a608bc562d34 (patch) | |
tree | 57914926543d42d97d092e75618ed32d4cb8ba37 /fs/bcachefs/fs-io.c | |
parent | 67b07638f1fab974284846d77cce771fed88ded3 (diff) | |
download | linux-8b3e9bd65f61dde939538452cbb2a608bc562d34.tar.xz |
bcachefs: Always check for transaction restarts
On transaction restart iterators won't be locked anymore - make sure
we're always checking for errors.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r-- | fs/bcachefs/fs-io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 4af8cd018e3a..1a06f77101ab 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -2668,13 +2668,13 @@ static int __bchfs_fallocate(struct bch_inode_info *inode, int mode, /* already reserved */ if (k.k->type == KEY_TYPE_reservation && bkey_s_c_to_reservation(k).v->nr_replicas >= replicas) { - bch2_btree_iter_next_slot(iter); + bch2_btree_iter_advance(iter); continue; } if (bkey_extent_is_data(k.k) && !(mode & FALLOC_FL_ZERO_RANGE)) { - bch2_btree_iter_next_slot(iter); + bch2_btree_iter_advance(iter); continue; } |