From 413daa1a3f4a50af7172a862f391867711e9bc04 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 9 Oct 2020 12:40:11 +0200 Subject: fuse: connection remove fix Re-add lost removal of fc from fuse_conn_list and the control filesystem. Reported-by: kernel test robot Fixes: fcee216beb9c ("fuse: split fuse_mount off of fuse_conn") Signed-off-by: Miklos Szeredi --- fs/fuse/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/fuse') diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 7eceb0f20c93..e21034ae1466 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -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); -- cgit v1.2.3