From 502cfb3591ec1f3d133c7eb281b8b93ca2bb2768 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 28 Nov 2021 14:08:58 -0500 Subject: bcachefs: Kill bch2_replicas_delta_list_marked() This changes bch2_trans_fs_usage_apply() to handle failure (replicas entry missing) by reverting the changes it made - meaning we can make the main transaction commit path a bit slimmer, and perhaps also simplify some locking in upcoming patches. Signed-off-by: Kent Overstreet --- fs/bcachefs/replicas.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'fs/bcachefs/replicas.c') diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c index 57e093983dfc..9bfe7fa51d32 100644 --- a/fs/bcachefs/replicas.c +++ b/fs/bcachefs/replicas.c @@ -475,20 +475,6 @@ static int __bch2_mark_bkey_replicas(struct bch_fs *c, struct bkey_s_c k, /* replicas delta list: */ -bool bch2_replicas_delta_list_marked(struct bch_fs *c, - struct replicas_delta_list *r) -{ - struct replicas_delta *d = r->d; - struct replicas_delta *top = (void *) r->d + r->used; - - percpu_rwsem_assert_held(&c->mark_lock); - - for (d = r->d; d != top; d = replicas_delta_next(d)) - if (bch2_replicas_entry_idx(c, &d->r) < 0) - return false; - return true; -} - int bch2_replicas_delta_list_mark(struct bch_fs *c, struct replicas_delta_list *r) { -- cgit v1.2.3