| .. | .. |
|---|
| 429 | 429 | if (set & 1) { |
|---|
| 430 | 430 | struct file * file = xchg(&fdt->fd[i], NULL); |
|---|
| 431 | 431 | if (file) { |
|---|
| 432 | + uninstall_inband_fd(i, file, files); |
|---|
| 432 | 433 | filp_close(file, files); |
|---|
| 433 | 434 | cond_resched(); |
|---|
| 434 | 435 | } |
|---|
| .. | .. |
|---|
| 646 | 647 | fdt = files_fdtable(files); |
|---|
| 647 | 648 | BUG_ON(fdt->fd[fd] != NULL); |
|---|
| 648 | 649 | rcu_assign_pointer(fdt->fd[fd], file); |
|---|
| 650 | + install_inband_fd(fd, file, files); |
|---|
| 649 | 651 | spin_unlock(&files->file_lock); |
|---|
| 650 | 652 | return; |
|---|
| 651 | 653 | } |
|---|
| .. | .. |
|---|
| 654 | 656 | fdt = rcu_dereference_sched(files->fdt); |
|---|
| 655 | 657 | BUG_ON(fdt->fd[fd] != NULL); |
|---|
| 656 | 658 | rcu_assign_pointer(fdt->fd[fd], file); |
|---|
| 659 | + install_inband_fd(fd, file, files); |
|---|
| 657 | 660 | rcu_read_unlock_sched(); |
|---|
| 658 | 661 | } |
|---|
| 659 | 662 | |
|---|
| .. | .. |
|---|
| 682 | 685 | goto out_unlock; |
|---|
| 683 | 686 | rcu_assign_pointer(fdt->fd[fd], NULL); |
|---|
| 684 | 687 | __put_unused_fd(files, fd); |
|---|
| 688 | + uninstall_inband_fd(fd, file, files); |
|---|
| 685 | 689 | |
|---|
| 686 | 690 | out_unlock: |
|---|
| 687 | 691 | spin_unlock(&files->file_lock); |
|---|
| .. | .. |
|---|
| 799 | 803 | goto out_err; |
|---|
| 800 | 804 | rcu_assign_pointer(fdt->fd[fd], NULL); |
|---|
| 801 | 805 | __put_unused_fd(files, fd); |
|---|
| 806 | + uninstall_inband_fd(fd, file, files); |
|---|
| 807 | + spin_unlock(&files->file_lock); |
|---|
| 802 | 808 | get_file(file); |
|---|
| 803 | 809 | *res = file; |
|---|
| 804 | 810 | return 0; |
|---|
| .. | .. |
|---|
| 850 | 856 | continue; |
|---|
| 851 | 857 | rcu_assign_pointer(fdt->fd[fd], NULL); |
|---|
| 852 | 858 | __put_unused_fd(files, fd); |
|---|
| 859 | + uninstall_inband_fd(fd, file, files); |
|---|
| 853 | 860 | spin_unlock(&files->file_lock); |
|---|
| 854 | 861 | filp_close(file, files); |
|---|
| 855 | 862 | cond_resched(); |
|---|
| .. | .. |
|---|
| 1088 | 1095 | __set_close_on_exec(fd, fdt); |
|---|
| 1089 | 1096 | else |
|---|
| 1090 | 1097 | __clear_close_on_exec(fd, fdt); |
|---|
| 1098 | + replace_inband_fd(fd, file, files); |
|---|
| 1091 | 1099 | spin_unlock(&files->file_lock); |
|---|
| 1092 | 1100 | |
|---|
| 1093 | 1101 | if (tofree) |
|---|