diff options
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r-- | libbcachefs/super.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c index 55da242c..1eab7c77 100644 --- a/libbcachefs/super.c +++ b/libbcachefs/super.c @@ -412,7 +412,7 @@ static void bch2_fs_free(struct bch_fs *c) bch2_io_clock_exit(&c->io_clock[WRITE]); bch2_io_clock_exit(&c->io_clock[READ]); bch2_fs_compress_exit(c); - lg_lock_free(&c->usage_lock); + percpu_free_rwsem(&c->usage_lock); free_percpu(c->usage_percpu); mempool_exit(&c->btree_bounce_pool); bioset_exit(&c->btree_bio); @@ -643,7 +643,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts) offsetof(struct btree_write_bio, wbio.bio)), BIOSET_NEED_BVECS) || !(c->usage_percpu = alloc_percpu(struct bch_fs_usage)) || - lg_lock_init(&c->usage_lock) || + percpu_init_rwsem(&c->usage_lock) || mempool_init_kvpmalloc_pool(&c->btree_bounce_pool, 1, btree_bytes(c)) || bch2_io_clock_init(&c->io_clock[READ]) || @@ -1215,6 +1215,8 @@ static int bch2_dev_attach_bdev(struct bch_fs *c, struct bch_sb_handle *sb) if (ret) return ret; + bch2_dev_sysfs_online(c, ca); + if (c->sb.nr_devices == 1) bdevname(ca->disk_sb.bdev, c->name); bdevname(ca->disk_sb.bdev, ca->name); |