fuse: check s_root when destroying sb
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 21 Oct 2021 08:01:38 +0000 (10:01 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 21 Oct 2021 08:01:38 +0000 (10:01 +0200)
commitd534d31d6a45d71de61db22090b4820afb68fddc
treeffaf3b2b74b8976d49eabffd4b6614decc2c8364
parent519d81956ee277b4419c723adfb154603c2565ba
fuse: check s_root when destroying sb

Checking "fm" works because currently sb->s_fs_info is cleared on error
paths; however, sb->s_root is what generic_shutdown_super() checks to
determine whether the sb was fully initialized or not.

This change will allow cleanup of sb setup error paths.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/inode.c
fs/fuse/virtio_fs.c