]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Call bch2_fs_start before getting vfs superblock
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 5 May 2025 19:52:57 +0000 (15:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 5 May 2025 20:06:35 +0000 (16:06 -0400)
commit9c618560994794d6f477e81f3b695fe799feec8a
tree0f0c056dff07b1de59b00e03ce1b3a74214eb6be
parentaed4ccbf4595e08f3fa80c7faaf1d2188d61bc70
bcachefs: Call bch2_fs_start before getting vfs superblock

This reverts

1fdbe0b184c8 bcachefs: Make sure c->vfs_sb is set before starting fs

switched up bch2_fs_get_tree() so that we got a superblock before
calling bch2_fs_start, so that c->vfs_sb would always be initialized
while the filesystem was active.

This turned out not to be necessary, because blk_holder_ops were
implemented using our own locking, not vfs locking.

And this had the side effect of creating a super_block and doing our
full recovery (including potentially fsck) before setting SB_BORN, which
causes things like sync calls to hang until our recovery is finished.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c