From: Miklos Szeredi Date: Fri, 9 Oct 2020 10:40:11 +0000 (+0200) Subject: fuse: connection remove fix X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=413daa1a3f4a50af7172a862f391867711e9bc04;p=linux.git 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 --- 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);