bcachefs: fix restart handling in bch2_do_invalidates_work()
this one is fairly harmless since the invalidate worker will just run again later if it needs to, but still worth fixing Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
028f3c1d9b
commit
7ee4be9c62
@ -2137,14 +2137,15 @@ static void bch2_do_invalidates_work(struct work_struct *work)
|
|||||||
|
|
||||||
struct bkey_s_c k = next_lru_key(trans, &iter, ca, &wrapped);
|
struct bkey_s_c k = next_lru_key(trans, &iter, ca, &wrapped);
|
||||||
ret = bkey_err(k);
|
ret = bkey_err(k);
|
||||||
if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
|
|
||||||
continue;
|
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
goto restart_err;
|
||||||
if (!k.k)
|
if (!k.k)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ret = invalidate_one_bucket(trans, &iter, k, &nr_to_invalidate);
|
ret = invalidate_one_bucket(trans, &iter, k, &nr_to_invalidate);
|
||||||
|
restart_err:
|
||||||
|
if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
|
||||||
|
continue;
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user