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

Commit dd9111f9 authored by Christian Brauner's avatar Christian Brauner Committed by Hridya Valsaraju
Browse files

UPSTREAM: binderfs: kill_litter_super() before cleanup



Al pointed out that first calling kill_litter_super() before cleaning up
info is more correct since destroying info doesn't depend on the state of
the dentries and inodes. That the opposite remains true is not guaranteed.

Suggested-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 136497735
(cherry picked from commit 4198479524aeccaf53c3a4cc73784982535573fa)
Change-Id: Ie2dfc2c2f17dde25b4215853b05fa8f21fb6b298
Signed-off-by: default avatarHridya Valsaraju <hridya@google.com>
parent 87c091ea
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -531,11 +531,12 @@ static void binderfs_kill_super(struct super_block *sb)
{
	struct binderfs_info *info = sb->s_fs_info;

	kill_litter_super(sb);

	if (info && info->ipc_ns)
		put_ipc_ns(info->ipc_ns);

	kfree(info);
	kill_litter_super(sb);
}

static struct file_system_type binder_fs_type = {