diff options
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r-- | libbcachefs/super.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c index 6980cd5b..a3438b0d 100644 --- a/libbcachefs/super.c +++ b/libbcachefs/super.c @@ -1974,11 +1974,15 @@ int bch2_dev_add(struct bch_fs *c, const char *path) ca->disk_sb.sb->dev_idx = dev_idx; bch2_dev_attach(c, ca, dev_idx); + set_bit(ca->dev_idx, c->online_devs.d); + if (BCH_MEMBER_GROUP(&dev_mi)) { ret = __bch2_dev_group_set(c, ca, label.buf); bch_err_msg(c, ret, "creating new label"); - if (ret) - goto err_unlock; + if (ret) { + mutex_unlock(&c->sb_lock); + goto err_late; + } } bch2_write_super(c); @@ -2526,6 +2530,8 @@ static int bch2_param_get_static_key_t(char *buffer, const struct kernel_param * return sprintf(buffer, "%c\n", static_key_enabled(key) ? 'N' : 'Y'); } +/* this is unused in userspace - silence the warning */ +__maybe_unused static const struct kernel_param_ops bch2_param_ops_static_key_t = { .flags = KERNEL_PARAM_OPS_FL_NOARG, .set = bch2_param_set_static_key_t, |