mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
bcachefs: Fix an assertion
bch2_trans_commit() can legitimately return -ENOSPC with BTREE_INSERT_NOFAIL set if BTREE_INSERT_NOWAIT was also set. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
eacb2574f0
commit
6558e61dfe
@ -816,7 +816,9 @@ int bch2_trans_commit_error(struct btree_trans *trans,
|
||||
}
|
||||
|
||||
BUG_ON((ret == EINTR || ret == -EAGAIN) && !trans->restarted);
|
||||
BUG_ON(ret == -ENOSPC && (trans->flags & BTREE_INSERT_NOFAIL));
|
||||
BUG_ON(ret == -ENOSPC &&
|
||||
!(trans->flags & BTREE_INSERT_NOWAIT) &&
|
||||
(trans->flags & BTREE_INSERT_NOFAIL));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user