From: Christian Brauner <christian@brauner.io>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk
Cc: tkjos@google.com, Christian Brauner <christian@brauner.io>
Subject: [PATCH 4/5] binderfs: kill_litter_super() before cleanup
Date: Fri, 18 Jan 2019 15:53:43 +0100 [thread overview]
Message-ID: <20190118145344.11532-5-christian@brauner.io> (raw)
In-Reply-To: <20190118145344.11532-1-christian@brauner.io>
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>
---
drivers/android/binderfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index c0fa495ee994..c5feb9ffce0f 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -541,11 +541,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 = {
--
2.19.1
next prev parent reply other threads:[~2019-01-18 14:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 14:53 [PATCH 0/5] binderfs: debug galore Christian Brauner
2019-01-18 14:53 ` [PATCH 1/5] binderfs: remove outdated comment Christian Brauner
2019-01-18 14:53 ` [PATCH 2/5] binderfs: prevent renaming the control dentry Christian Brauner
2019-01-18 22:55 ` Al Viro
2019-01-19 15:10 ` Christian Brauner
2019-01-18 14:53 ` [PATCH 3/5] binderfs: rework binderfs_fill_super() Christian Brauner
2019-01-18 23:03 ` Al Viro
2019-01-19 15:12 ` Christian Brauner
2019-01-18 14:53 ` Christian Brauner [this message]
2019-01-18 14:53 ` [PATCH 5/5] binderfs: drop lock in binderfs_binder_ctl_create Christian Brauner
2019-01-18 23:26 ` [PATCH 0/5] binderfs: debug galore Al Viro
2019-01-19 15:55 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190118145344.11532-5-christian@brauner.io \
--to=christian@brauner.io \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tkjos@google.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).