diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-18 23:44:21 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:11 +0200 |
commit | 7573041ab958a14407621ef9756be49548f937e6 (patch) | |
tree | e795b75460ee083d3dc06190ce1d9c1b640f68d1 /fs/bcachefs/super.c | |
parent | bcachefs: Delete a faulty assertion (diff) | |
download | linux-7573041ab958a14407621ef9756be49548f937e6.tar.xz linux-7573041ab958a14407621ef9756be49548f937e6.zip |
bcachefs: Fix bch2_mount error path
In the bch2_mount() error path, we were calling
deactivate_locked_super(), which calls ->kill_sb(), which in our case
was calling bch2_fs_free() without __bch2_fs_stop().
This changes bch2_mount() to just call bch2_fs_stop() directly.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 8e2ec3b6c9b3..60424865980d 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -581,6 +581,8 @@ void bch2_fs_free(struct bch_fs *c) { unsigned i; + BUG_ON(!test_bit(BCH_FS_STOPPING, &c->flags)); + mutex_lock(&bch_fs_list_lock); list_del(&c->list); mutex_unlock(&bch_fs_list_lock); |