This is a note to let you know that I've just added the patch titled fuse: check s_root when destroying sb to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fuse-check-s_root-when-destroying-sb.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d534d31d6a45d71de61db22090b4820afb68fddc Mon Sep 17 00:00:00 2001 From: Miklos Szeredi <mszeredi@xxxxxxxxxx> Date: Thu, 21 Oct 2021 10:01:38 +0200 Subject: fuse: check s_root when destroying sb From: Miklos Szeredi <mszeredi@xxxxxxxxxx> commit d534d31d6a45d71de61db22090b4820afb68fddc upstream. 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@xxxxxxxxxx> Signed-off-by: Yang Bo <yb203166@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/fuse/inode.c | 2 +- fs/fuse/virtio_fs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1596,7 +1596,7 @@ static void fuse_kill_sb_blk(struct supe struct fuse_mount *fm = get_fuse_mount_super(sb); bool last; - if (fm) { + if (sb->s_root) { last = fuse_mount_remove(fm); if (last) fuse_conn_destroy(fm); --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -1399,7 +1399,7 @@ static void virtio_kill_sb(struct super_ 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); Patches currently in stable-queue which might be from mszeredi@xxxxxxxxxx are queue-5.10/virtiofs-split-requests-that-exceed-virtqueue-size.patch queue-5.10/virtiofs-clean-up-error-handling-in-virtio_fs_get_tree.patch queue-5.10/fuse-always-revalidate-rename-target-dentry.patch queue-5.10/fuse-check-s_root-when-destroying-sb.patch queue-5.10/fuse-fix-attr-version-comparison-in-fuse_read_update_size.patch queue-5.10/fuse-fix-deadlock-between-atomic-o_trunc-and-page-invalidation.patch