bcachefs: btree_update_nodes_written() needs BTREE_INSERT_USE_RESERVE

This fixes an obvious deadlock - whoops.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2022-09-23 00:20:21 -04:00
parent d602657cd1
commit 01ed3359b2

View File

@ -625,6 +625,7 @@ static void btree_update_nodes_written(struct btree_update *as)
ret = commit_do(&trans, &as->disk_res, &journal_seq, ret = commit_do(&trans, &as->disk_res, &journal_seq,
BTREE_INSERT_NOFAIL| BTREE_INSERT_NOFAIL|
BTREE_INSERT_NOCHECK_RW| BTREE_INSERT_NOCHECK_RW|
BTREE_INSERT_USE_RESERVE|
BTREE_INSERT_JOURNAL_RECLAIM| BTREE_INSERT_JOURNAL_RECLAIM|
JOURNAL_WATERMARK_reserved, JOURNAL_WATERMARK_reserved,
btree_update_nodes_written_trans(&trans, as)); btree_update_nodes_written_trans(&trans, as));