mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
bcachefs: Fix an unhandled transaction restart error
This is a bit awkward: we're passing around a btree_trans, but we're not in a context where transaction restarts are handled - we should try to come up with a better way to denote situations like this. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
dc6274bcb8
commit
3e36e572f1
@ -713,6 +713,11 @@ int __bch2_evacuate_bucket(struct btree_trans *trans,
|
||||
|
||||
bch2_bkey_buf_init(&sk);
|
||||
|
||||
/*
|
||||
* We're not run in a context that handles transaction restarts:
|
||||
*/
|
||||
bch2_trans_begin(trans);
|
||||
|
||||
bch2_trans_iter_init(trans, &iter, BTREE_ID_alloc,
|
||||
bucket, BTREE_ITER_CACHED);
|
||||
ret = lockrestart_do(trans,
|
||||
|
Loading…
Reference in New Issue
Block a user