Commit 7c4cb50e authored by Florian Albrechtskirchinger's avatar Florian Albrechtskirchinger Committed by Kent Overstreet
Browse files

bcachefs: Fix bch2_fs_get_tree() error path



When a filesystem is mounted read-only, subsequent attempts to mount it
as read-write fail with EBUSY. Previously, the error path in
bch2_fs_get_tree() would unconditionally call __bch2_fs_stop(),
improperly freeing resources for a filesystem that was still actively
mounted. This change modifies the error path to only call
__bch2_fs_stop() if the superblock has no valid root dentry, ensuring
resources are not cleaned up prematurely when the filesystem is in use.

Signed-off-by: default avatarFlorian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6b1e0b9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment