Commit 54460a62 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Delete some dead code

__bch2_mark_replicas() is now only used in one place, so inline it into
the caller.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 0678cbe2
...@@ -421,18 +421,10 @@ static int bch2_mark_replicas_slowpath(struct bch_fs *c, ...@@ -421,18 +421,10 @@ static int bch2_mark_replicas_slowpath(struct bch_fs *c,
goto out; goto out;
} }
static int __bch2_mark_replicas(struct bch_fs *c,
struct bch_replicas_entry *r,
bool check)
{
return likely(bch2_replicas_marked(c, r)) ? 0
: check ? -1
: bch2_mark_replicas_slowpath(c, r);
}
int bch2_mark_replicas(struct bch_fs *c, struct bch_replicas_entry *r) int bch2_mark_replicas(struct bch_fs *c, struct bch_replicas_entry *r)
{ {
return __bch2_mark_replicas(c, r, false); return likely(bch2_replicas_marked(c, r))
? 0 : bch2_mark_replicas_slowpath(c, r);
} }
/* replicas delta list: */ /* replicas delta list: */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment