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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
37dd783474
commit
5884fddfe7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user