From 5d30dbe4bfec15fa424c74883fef3294e32a5085 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 9 Oct 2020 12:40:11 +0200 Subject: [PATCH] UPSTREAM: 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") Change-Id: Icaaee7958947461b80a10d42a38ff5a3078e268a Signed-off-by: Miklos Szeredi --- fs/fuse/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index eff17f7f376e..bd35be7ba89f 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1581,6 +1581,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);