summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-28 00:32:48 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:05 +0300
commitf33c58fc46a9c5bd6cbf90edb6ce17fa3fd912d5 (patch)
treed8a245eb7cf6e7ef9d7a6fc0a02cf06ba917dc2e /fs/bcachefs/alloc_background.c
parent65db60490a36cbfc0500cb86bf539614c89501d3 (diff)
downloadlinux-f33c58fc46a9c5bd6cbf90edb6ce17fa3fd912d5.tar.xz
bcachefs: Kill BTREE_INSERT_USE_RESERVE
Now that we have journal watermarks and alloc watermarks unified, BTREE_INSERT_USE_RESERVE is redundant and can be deleted. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 4486ce0b7920..81e80f36af43 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -1719,7 +1719,8 @@ static int bch2_discard_one_bucket(struct btree_trans *trans,
write:
ret = bch2_trans_update(trans, &iter, &a->k_i, 0) ?:
bch2_trans_commit(trans, NULL, NULL,
- BTREE_INSERT_USE_RESERVE|BTREE_INSERT_NOFAIL);
+ BCH_WATERMARK_btree|
+ BTREE_INSERT_NOFAIL);
if (ret)
goto out;
@@ -1827,7 +1828,8 @@ static int invalidate_one_bucket(struct btree_trans *trans,
ret = bch2_trans_update(trans, &alloc_iter, &a->k_i,
BTREE_TRIGGER_BUCKET_INVALIDATE) ?:
bch2_trans_commit(trans, NULL, NULL,
- BTREE_INSERT_USE_RESERVE|BTREE_INSERT_NOFAIL);
+ BCH_WATERMARK_btree|
+ BTREE_INSERT_NOFAIL);
if (ret)
goto out;