case BCH_ON_ERROR_RO:
if (!test_bit(BCH_FS_INITIAL_GC_DONE, &c->flags)) {
/* XXX do something better here? */
- bch_fs_stop(c);
+ bch_fs_stop_async(c);
return;
}
} else {
bch_notify_dev_error(ca, true);
- mutex_lock(&bch_register_lock);
+ mutex_lock(&c->state_lock);
dev = bch_dev_may_remove(ca);
if (dev
? bch_dev_read_only(ca)
"too many IO errors on %s, setting %s RO",
bdevname(ca->disk_sb.bdev, buf),
dev ? "device" : "filesystem");
- mutex_unlock(&bch_register_lock);
+ mutex_unlock(&c->state_lock);
}
}