summaryrefslogtreecommitdiff
path: root/fs/fuse/virtio_fs.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2021-10-21 11:01:38 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2021-10-21 11:01:38 +0300
commitd534d31d6a45d71de61db22090b4820afb68fddc (patch)
treeffaf3b2b74b8976d49eabffd4b6614decc2c8364 /fs/fuse/virtio_fs.c
parent519d81956ee277b4419c723adfb154603c2565ba (diff)
downloadlinux-d534d31d6a45d71de61db22090b4820afb68fddc.tar.xz
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>
Diffstat (limited to 'fs/fuse/virtio_fs.c')
-rw-r--r--fs/fuse/virtio_fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 0ad89c6629d7..32fd138c621e 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -1394,7 +1394,7 @@ static void virtio_kill_sb(struct super_block *sb)
bool last;
/* If mount failed, we can still be called without any fc */
- if (fm) {
+ if (sb->s_root) {
last = fuse_mount_remove(fm);
if (last)
virtio_fs_conn_destroy(fm);