Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbd99797 authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

cuse: fix fuse_conn_kill()



fuse_conn_kill() removed fc->entry, called fuse_ctl_remove_conn() and
fuse_bdi_destroy().  None of which is appropriate for cuse cleanup.

The fuse_ctl_remove_conn() decrements the nlink on the control filesystem, which
is totally bogus.  The others are harmless but unnecessary.

So move these out from fuse_conn_kill() to fuse_put_super() where they belong.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent fea7a08a
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -367,11 +367,6 @@ void fuse_conn_kill(struct fuse_conn *fc)
	wake_up_all(&fc->waitq);
	wake_up_all(&fc->blocked_waitq);
	wake_up_all(&fc->reserved_req_waitq);
	mutex_lock(&fuse_mutex);
	list_del(&fc->entry);
	fuse_ctl_remove_conn(fc);
	mutex_unlock(&fuse_mutex);
	fuse_bdi_destroy(fc);
}
EXPORT_SYMBOL_GPL(fuse_conn_kill);

@@ -380,7 +375,14 @@ static void fuse_put_super(struct super_block *sb)
	struct fuse_conn *fc = get_fuse_conn_super(sb);

	fuse_send_destroy(fc);

	fuse_conn_kill(fc);
	mutex_lock(&fuse_mutex);
	list_del(&fc->entry);
	fuse_ctl_remove_conn(fc);
	mutex_unlock(&fuse_mutex);
	fuse_bdi_destroy(fc);

	fuse_conn_put(fc);
}