mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 13:43:21 -04:00
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:
committed by
Kent Overstreet
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;
|
||||
|
||||
Reference in New Issue
Block a user