diff options
author | Christian Brauner <christian@brauner.io> | 2019-01-21 05:48:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-22 06:25:53 -0500 |
commit | 4198479524aeccaf53c3a4cc73784982535573fa (patch) | |
tree | 8094fbd582ea9db30f0fc6c807bae1474f52504c | |
parent | 01b3f1fc568352a1ffdcd3ee82a0297f16cc9bd9 (diff) |
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: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/android/binderfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c index 1e077498a507..ba88be172aee 100644 --- a/drivers/android/binderfs.c +++ b/drivers/android/binderfs.c | |||
@@ -531,11 +531,12 @@ static void binderfs_kill_super(struct super_block *sb) | |||
531 | { | 531 | { |
532 | struct binderfs_info *info = sb->s_fs_info; | 532 | struct binderfs_info *info = sb->s_fs_info; |
533 | 533 | ||
534 | kill_litter_super(sb); | ||
535 | |||
534 | if (info && info->ipc_ns) | 536 | if (info && info->ipc_ns) |
535 | put_ipc_ns(info->ipc_ns); | 537 | put_ipc_ns(info->ipc_ns); |
536 | 538 | ||
537 | kfree(info); | 539 | kfree(info); |
538 | kill_litter_super(sb); | ||
539 | } | 540 | } |
540 | 541 | ||
541 | static struct file_system_type binder_fs_type = { | 542 | static struct file_system_type binder_fs_type = { |