Commit 5884fddf authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix starting copygc when already started

We can sometimes call bch2_dev_read_write() when the device is already
RW (in error paths).
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 37dd7834
......@@ -283,7 +283,8 @@ int bch2_copygc_start(struct bch_fs *c, struct bch_dev *ca)
{
struct task_struct *t;
BUG_ON(ca->copygc_thread);
if (ca->copygc_thread)
return 0;
if (c->opts.nochanges)
return 0;
......
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