summaryrefslogtreecommitdiffstats
path: root/drivers/android/binder.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r--drivers/android/binder.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index a6b2082c24f8..3069a0bad50f 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -5221,7 +5221,7 @@ static int binder_open(struct inode *nodp, struct file *filp)
proc->default_priority = task_nice(current);
/* binderfs stashes devices in i_private */
if (is_binderfs_device(nodp)) {
- binder_dev = nodp->i_private;
+ binder_dev = binderfs_device_get(nodp->i_private);
info = nodp->i_sb->s_fs_info;
binder_binderfs_dir_entry_proc = info->proc_log_dir;
} else {
@@ -5405,6 +5405,7 @@ static int binder_node_release(struct binder_node *node, int refs)
static void binder_deferred_release(struct binder_proc *proc)
{
struct binder_context *context = proc->context;
+ struct binder_device *device;
struct rb_node *n;
int threads, nodes, incoming_refs, outgoing_refs, active_transactions;
@@ -5484,6 +5485,8 @@ static void binder_deferred_release(struct binder_proc *proc)
outgoing_refs, active_transactions);
binder_proc_dec_tmpref(proc);
+ device = container_of(proc->context, struct binder_device, context);
+ binderfs_device_put(device);
}
static void binder_deferred_func(struct work_struct *work)