summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c_src/cmd_option.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/c_src/cmd_option.c b/c_src/cmd_option.c
index 866dfeb2..0dcbe312 100644
--- a/c_src/cmd_option.c
+++ b/c_src/cmd_option.c
@@ -88,8 +88,6 @@ int cmd_set_option(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- mutex_lock(&c->sb_lock);
-
for (i = 0; i < bch2_opts_nr; i++) {
const struct bch_option *opt = bch2_opt_table + i;
@@ -108,7 +106,7 @@ int cmd_set_option(int argc, char *argv[])
fprintf(stderr, "Can't set option %s\n", opt->attr.name);
if (opt->flags & OPT_FS) {
- __bch2_opt_set_sb(c->disk_sb.sb, -1, opt, v);
+ bch2_opt_set_sb(c, NULL, opt, v);
}
if (opt->flags & OPT_DEVICE) {
@@ -119,14 +117,11 @@ int cmd_set_option(int argc, char *argv[])
continue;
}
- __bch2_opt_set_sb(c->disk_sb.sb, dev_idx, opt, v);
+ bch2_opt_set_sb(c, c->devs[dev_idx], opt, v);
}
}
}
- bch2_write_super(c);
- mutex_unlock(&c->sb_lock);
-
bch2_fs_stop(c);
return ret;
} else {