]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
fuse: connection remove fix
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 9 Oct 2020 10:40:11 +0000 (12:40 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 12 Oct 2020 08:28:14 +0000 (10:28 +0200)
Re-add lost removal of fc from fuse_conn_list and the control filesystem.

Reported-by: kernel test robot <rong.a.chen@intel.com>
Fixes: fcee216beb9c ("fuse: split fuse_mount off of fuse_conn")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/inode.c

index 7eceb0f20c9363ce4c6b201e61d6c04ae840633d..e21034ae146636f8a1c090df4f7d011592fab5d8 100644 (file)
@@ -1547,6 +1547,13 @@ void fuse_conn_destroy(struct fuse_mount *fm)
 
        fuse_abort_conn(fc);
        fuse_wait_aborted(fc);
+
+       if (!list_empty(&fc->entry)) {
+               mutex_lock(&fuse_mutex);
+               list_del(&fc->entry);
+               fuse_ctl_remove_conn(fc);
+               mutex_unlock(&fuse_mutex);
+       }
 }
 EXPORT_SYMBOL_GPL(fuse_conn_destroy);