diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/android/binder.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index 4946d282a35c..9e1a98a360d4 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -386,17 +386,8 @@ int task_get_unused_fd_flags(struct binder_proc *proc, int flags) static void task_fd_install( struct binder_proc *proc, unsigned int fd, struct file *file) { - struct files_struct *files = proc->files; - struct fdtable *fdt; - - if (files == NULL) - return; - - spin_lock(&files->file_lock); - fdt = files_fdtable(files); - BUG_ON(fdt->fd[fd] != NULL); - rcu_assign_pointer(fdt->fd[fd], file); - spin_unlock(&files->file_lock); + if (proc->files) + __fd_install(proc->files, fd, file); } /* |