mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
bcachefs: Fix an iterator bug
We were incorrectly not restarting the transaction when re-traversing iterators. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
6d61724b2b
commit
8666a9ad6f
1 changed files with 8 additions and 1 deletions
|
@ -1068,7 +1068,14 @@ retry_all:
|
|||
goto retry_all;
|
||||
}
|
||||
|
||||
ret = hweight64(trans->iters_live) > 1 ? -EINTR : 0;
|
||||
if (hweight64(trans->iters_live) > 1)
|
||||
ret = -EINTR;
|
||||
else
|
||||
trans_for_each_iter(trans, iter)
|
||||
if (iter->flags & BTREE_ITER_KEEP_UNTIL_COMMIT) {
|
||||
ret = -EINTR;
|
||||
break;
|
||||
}
|
||||
out:
|
||||
bch2_btree_cache_cannibalize_unlock(c);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue