bcachefs: Use BTREE_INSERT_USE_RESERVE in btree_update_key()
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 8 Jan 2022 08:39:54 +0000 (03:39 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:22 +0000 (17:09 -0400)
bch2_btree_update_key() is used in the btree node write path - before
delivering the completion we have to update the parent pointer with the
number of sectors written.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/btree_update_interior.c

index 29dda2352afde2e001a8b286280e9007a2ba8788..0e7644a3a436e17ece1df34311a74eb9a2eac845 100644 (file)
@@ -1937,6 +1937,7 @@ static int __bch2_btree_node_update_key(struct btree_trans *trans,
        ret = bch2_trans_commit(trans, NULL, NULL,
                                BTREE_INSERT_NOFAIL|
                                BTREE_INSERT_NOCHECK_RW|
+                               BTREE_INSERT_USE_RESERVE|
                                BTREE_INSERT_JOURNAL_RECLAIM|
                                BTREE_INSERT_JOURNAL_RESERVED);
        if (ret)