binderfs_binder_ctl_create(): kill a bogus check
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 May 2024 03:21:06 +0000 (23:21 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 16 Nov 2025 06:35:04 +0000 (01:35 -0500)
It's called once, during binderfs mount, right after allocating
root dentry.  Checking that it hadn't been already called is
only obfuscating things.

Looks like that bogosity had been copied from devpts...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/android/binderfs.c

index a7b0a77..8253e51 100644 (file)
@@ -397,12 +397,6 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
        if (!device)
                return -ENOMEM;
 
-       /* If we have already created a binder-control node, return. */
-       if (info->control_dentry) {
-               ret = 0;
-               goto out;
-       }
-
        ret = -ENOMEM;
        inode = new_inode(sb);
        if (!inode)