diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-12-11 14:10:35 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-20 17:01:53 -0700 |
commit | 6e802a4ba056a6f2f51ac9d54eead3ed6f9829a2 (patch) | |
tree | 1fcd466f66bb1d54d2737ecbdec83a500649961b /drivers/android/binder.c | |
parent | 15b71abe7b52df214785dde0de9f581cc0216d17 (diff) |
fs: move filp_close() outside of __close_fd_get_file()
Just one caller of this, and just use filp_close() there manually.
This is important to allow async close/removal of the fd.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r-- | drivers/android/binder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index b2dad43dbf82..cf72ca250a08 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2249,10 +2249,12 @@ static void binder_deferred_fd_close(int fd) return; init_task_work(&twcb->twork, binder_do_fd_close); __close_fd_get_file(fd, &twcb->file); - if (twcb->file) + if (twcb->file) { + filp_close(twcb->file, current->files); task_work_add(current, &twcb->twork, true); - else + } else { kfree(twcb); + } } static void binder_transaction_buffer_release(struct binder_proc *proc, |