Skip to content

Commit 29ef1c8

Browse files
braunergregkh
authored andcommitted
binderfs: drop lock in binderfs_binder_ctl_create
The binderfs_binder_ctl_create() call is a no-op on subsequent calls and the first call is done before we unlock the suberblock. Hence, there is no need to take inode_lock() in there. Let's remove it. 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>
1 parent 4198479 commit 29ef1c8

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎drivers/android/binderfs.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,6 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
400400
if (!device)
401401
return -ENOMEM;
402402

403-
inode_lock(d_inode(root));
404-
405403
/* If we have already created a binder-control node, return. */
406404
if (info->control_dentry) {
407405
ret = 0;
@@ -440,12 +438,10 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
440438
inode->i_private = device;
441439
info->control_dentry = dentry;
442440
d_add(dentry, inode);
443-
inode_unlock(d_inode(root));
444441

445442
return 0;
446443

447444
out:
448-
inode_unlock(d_inode(root));
449445
kfree(device);
450446
iput(inode);
451447

0 commit comments

Comments
 (0)