| /linux/security/landlock/ |
| H A D | syscalls.c | 281 if (fd_file(ruleset_f)->f_op != &ruleset_fops) in get_ruleset_from_fd() 283 if (!(fd_file(ruleset_f)->f_mode & mode)) 285 ruleset = fd_file(ruleset_f)->private_data; 311 if ((fd_file(f)->f_op == &ruleset_fops) || in get_path_from_fd() 312 (fd_file(f)->f_path.mnt->mnt_flags & MNT_INTERNAL) || in get_path_from_fd() 313 (fd_file(f)->f_path.dentry->d_sb->s_flags & SB_NOUSER) || 314 IS_PRIVATE(d_backing_inode(fd_file(f)->f_path.dentry))) in add_rule_path_beneath() 317 *path = fd_file(f)->f_path; in add_rule_path_beneath()
|
| /linux/fs/ |
| H A D | ioctl.c | 239 cloned = vfs_clone_file_range(fd_file(src_file), off, dst_file, destoff, in ioctl_file_clone() 591 error = security_file_ioctl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3() 595 error = do_vfs_ioctl(fd_file(f), fd, cmd, arg); in SYSCALL_DEFINE3() 597 error = vfs_ioctl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3() 647 error = security_file_ioctl_compat(fd_file(f), cmd, arg); in COMPAT_SYSCALL_DEFINE3() 654 error = ioctl_file_clone(fd_file(f), arg, 0, 0, 0); in COMPAT_SYSCALL_DEFINE3() 661 error = compat_ioctl_preallocate(fd_file(f), 0, compat_ptr(arg)); in COMPAT_SYSCALL_DEFINE3() 665 error = compat_ioctl_preallocate(fd_file(f), FALLOC_FL_PUNCH_HOLE, in COMPAT_SYSCALL_DEFINE3() 669 error = compat_ioctl_preallocate(fd_file(f), FALLOC_FL_ZERO_RANGE, in COMPAT_SYSCALL_DEFINE3() 689 error = do_vfs_ioctl(fd_file(f), fd, cmd, in COMPAT_SYSCALL_DEFINE3() [all …]
|
| H A D | fcntl.c | 411 return fd_file(f) == filp; in f_dupfd_query() 595 if (unlikely(fd_file(f)->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3() 600 err = security_file_fcntl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3() 602 err = do_fcntl(fd, cmd, arg, fd_file(f)); in SYSCALL_DEFINE3() 619 if (unlikely(fd_file(f)->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3() 624 err = security_file_fcntl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3() 634 err = fcntl_getlk64(fd_file(f), cmd, &flock); in SYSCALL_DEFINE3() 645 err = fcntl_setlk64(fd, fd_file(f), cmd, &flock); in SYSCALL_DEFINE3() 648 err = do_fcntl(fd, cmd, arg, fd_file(f)); in SYSCALL_DEFINE3() 753 if (unlikely(fd_file(f)->f_mode & FMODE_PATH)) { in do_compat_fcntl64() [all …]
|
| H A D | sync.c | 156 sb = fd_file(f)->f_path.dentry->d_sb; in SYSCALL_DEFINE1() 162 ret2 = errseq_check_and_advance(&sb->s_wb_err, &fd_file(f)->f_sb_err); in SYSCALL_DEFINE1() 211 return vfs_fsync(fd_file(f), datasync); in do_fsync() 357 return sync_file_range(fd_file(f), offset, nbytes, flags); in ksys_sync_file_range()
|
| H A D | eventpoll.c | 2257 if (!file_can_poll(fd_file(tf))) in do_epoll_ctl() 2270 if (fd_file(f) == fd_file(tf) || !is_file_epoll(fd_file(f))) in do_epoll_ctl() 2281 if (op == EPOLL_CTL_ADD && (is_file_epoll(fd_file(tf)) || in do_epoll_ctl() 2290 ep = fd_file(f)->private_data; in do_epoll_ctl() 2311 if (READ_ONCE(fd_file(f)->f_ep) || ep->gen == loop_check_gen || in do_epoll_ctl() 2312 is_file_epoll(fd_file(tf))) { in do_epoll_ctl() 2319 if (is_file_epoll(fd_file(tf))) { in do_epoll_ctl() 2320 tep = fd_file(tf)->private_data; in do_epoll_ctl() 2336 epi = ep_find(ep, fd_file(tf), fd); in do_epoll_ctl() 2343 error = ep_insert(ep, epds, fd_file(tf), fd, full_check); in do_epoll_ctl() [all …]
|
| H A D | kernel_read_file.c | 180 if (fd_empty(f) || !(fd_file(f)->f_mode & FMODE_READ)) in kernel_read_file_from_fd() 183 return kernel_read_file(fd_file(f), offset, buf, buf_size, file_size, id); in kernel_read_file_from_fd()
|
| H A D | timerfd.c | 458 if (fd_file(f)->f_op != &timerfd_fops) in do_timerfd_settime() 461 ctx = fd_file(f)->private_data; in do_timerfd_settime() 522 if (fd_file(f)->f_op != &timerfd_fops) in do_timerfd_gettime() 524 ctx = fd_file(f)->private_data; in do_timerfd_gettime()
|
| H A D | splice.c | 1593 if (fd_file(f)->f_mode & FMODE_WRITE) in SYSCALL_DEFINE4() 1595 else if (fd_file(f)->f_mode & FMODE_READ) in SYSCALL_DEFINE4() 1608 error = vmsplice_to_pipe(fd_file(f), &iter, flags); in SYSCALL_DEFINE4() 1610 error = vmsplice_to_user(fd_file(f), &iter, flags); in SYSCALL_DEFINE4() 1634 return __do_splice(fd_file(in), off_in, fd_file(out), off_out, in SYSCALL_DEFINE6() 1993 return do_tee(fd_file(in), fd_file(out), len, flags); in SYSCALL_DEFINE4()
|
| H A D | signalfd.c | 286 ctx = fd_file(f)->private_data; in do_signalfd4() 287 if (fd_file(f)->f_op != &signalfd_fops) in do_signalfd4()
|
| H A D | fsopen.c | 403 if (fd_file(f)->f_op != &fscontext_fops) in SYSCALL_DEFINE5() 406 fc = fd_file(f)->private_data; in SYSCALL_DEFINE5()
|
| H A D | file_attr.c | 405 filepath = fd_file(f)->f_path; in SYSCALL_DEFINE5() 467 filepath = fd_file(f)->f_path; in SYSCALL_DEFINE5()
|
| /linux/drivers/target/ |
| H A D | target_core_file.c | 91 struct file *file = FD_DEV(dev)->fd_file; in fd_configure_unmap() 146 fd_dev->fd_file = file; in fd_configure_device() 214 if (fd_dev->fd_file) { in fd_configure_device() 215 filp_close(fd_dev->fd_file, NULL); in fd_configure_device() 216 fd_dev->fd_file = NULL; in fd_configure_device() 238 if (fd_dev->fd_file) { in fd_destroy_device() 239 filp_close(fd_dev->fd_file, NULL); in fd_destroy_device() 240 fd_dev->fd_file = NULL; in fd_destroy_device() 272 struct file *file = fd_dev->fd_file; in fd_execute_rw_aio() 412 ret = vfs_fsync_range(fd_dev->fd_file, start, end, 1); in fd_execute_sync_cache() [all …]
|
| H A D | target_core_file.h | 40 struct file *fd_file; member
|
| /linux/ipc/ |
| H A D | mqueue.c | 1065 inode = file_inode(fd_file(f)); in do_mq_timedsend() 1066 if (unlikely(fd_file(f)->f_op != &mqueue_file_operations)) in do_mq_timedsend() 1069 audit_file(fd_file(f)); in do_mq_timedsend() 1071 if (unlikely(!(fd_file(f)->f_mode & FMODE_WRITE))) in do_mq_timedsend() 1105 if (fd_file(f)->f_flags & O_NONBLOCK) { in do_mq_timedsend() 1165 inode = file_inode(fd_file(f)); in do_mq_timedreceive() 1166 if (unlikely(fd_file(f)->f_op != &mqueue_file_operations)) in do_mq_timedreceive() 1169 audit_file(fd_file(f)); in do_mq_timedreceive() 1171 if (unlikely(!(fd_file(f)->f_mode & FMODE_READ))) in do_mq_timedreceive() 1197 if (fd_file(f)->f_flags & O_NONBLOCK) { in do_mq_timedreceive() [all …]
|
| /linux/include/linux/ |
| H A D | file.h | 44 #define fd_file(f) ((struct file *)((f).word & ~(FDPUT_FPUT|FDPUT_POS_UNLOCK))) macro 63 fput(fd_file(fd)); in fdput() 79 __f_unlock_pos(fd_file(f)); in fdput_pos()
|
| /linux/arch/powerpc/platforms/cell/ |
| H A D | spu_syscalls.c | 72 return calls->create_thread(name, flags, mode, fd_file(neighbor)); in DEFINE_CLASS() 88 return calls->spu_run(fd_file(arg), unpc, ustatus); in SYSCALL_DEFINE3()
|
| /linux/kernel/bpf/ |
| H A D | token.c | 127 path = fd_file(f)->f_path; in bpf_token_create() 227 if (fd_file(f)->f_op != &bpf_token_fops) in bpf_token_get_from_fd() 230 token = fd_file(f)->private_data; in bpf_token_get_from_fd()
|
| H A D | syscall.c | 984 fmode_t mode = fd_file(f)->f_mode; in map_get_sys_perms() 1805 err = bpf_map_update_value(map, fd_file(f), key, value, attr->flags); in map_update_elem() 2591 if (fd_file(f)->f_op != &bpf_prog_fops) in __bpf_prog_get() 2594 prog = fd_file(f)->private_data; in __bpf_prog_get() 3494 if (fd_file(f)->f_op != &bpf_link_fops && fd_file(f)->f_op != &bpf_link_fops_poll) in bpf_link_get_from_fd() 3497 link = fd_file(f)->private_data; in bpf_link_get_from_fd() 5453 if (fd_file(f)->f_op == &bpf_prog_fops) in bpf_obj_get_info_by_fd() 5454 return bpf_prog_get_info_by_fd(fd_file(f), fd_file(f)->private_data, attr, in bpf_obj_get_info_by_fd() 5456 else if (fd_file(f)->f_op == &bpf_map_fops) in bpf_obj_get_info_by_fd() 5457 return bpf_map_get_info_by_fd(fd_file(f), fd_file(f)->private_data, attr, in bpf_obj_get_info_by_fd() [all …]
|
| /linux/arch/arm/kernel/ |
| H A D | sys_oabi-compat.c | 248 err = security_file_fcntl(fd_file(f), cmd, arg); in sys_oabi_fcntl64() 254 err = fcntl_getlk64(fd_file(f), cmd, &flock); in sys_oabi_fcntl64() 262 err = security_file_fcntl(fd_file(f), cmd, arg); in sys_oabi_fcntl64() 268 err = fcntl_setlk64(fd, fd_file(f), cmd, &flock); in sys_oabi_fcntl64()
|
| /linux/drivers/vfio/ |
| H A D | virqfd.c | 141 ctx = eventfd_ctx_fileget(fd_file(irqfd)); in vfio_virqfd_enable() 173 events = vfs_poll(fd_file(irqfd), &virqfd->pt); in vfio_virqfd_enable()
|
| /linux/drivers/virt/acrn/ |
| H A D | irqfd.c | 130 eventfd = eventfd_ctx_fileget(fd_file(f)); in acrn_irqfd_assign() 157 events = vfs_poll(fd_file(f), &irqfd->pt); in acrn_irqfd_assign()
|
| /linux/virt/kvm/ |
| H A D | vfio.c | 203 if (kvf->file != fd_file(f)) in kvm_vfio_file_del() 244 if (kvf->file != fd_file(f)) in kvm_vfio_file_set_spapr_tce()
|
| /linux/net/ |
| H A D | socket.c | 1956 sock = sock_from_file(fd_file(f)); in __sys_bind() 1998 sock = sock_from_file(fd_file(f)); in __sys_listen() 2103 return __sys_accept4_file(fd_file(f), upeer_sockaddr, in __sys_accept4() 2167 return __sys_connect_file(fd_file(f), &address, addrlen, 0); in __sys_connect() 2207 sock = sock_from_file(fd_file(f)); in __sys_getsockname() 2245 sock = sock_from_file(fd_file(f)); in __sys_sendto() 2309 sock = sock_from_file(fd_file(f)); in __sys_recvfrom() 2402 sock = sock_from_file(fd_file(f)); in __sys_setsockopt() 2514 sock = sock_from_file(fd_file(f)); in __sys_getsockopt() 2550 sock = sock_from_file(fd_file(f)); in __sys_shutdown() [all …]
|
| /linux/fs/smb/client/ |
| H A D | ioctl.c | 96 if (fd_file(src_file)->f_op->unlocked_ioctl != cifs_ioctl) { in cifs_ioctl_copychunk() 102 src_inode = file_inode(fd_file(src_file)); in cifs_ioctl_copychunk() 107 rc = cifs_file_copychunk_range(xid, fd_file(src_file), 0, dst_file, 0, in cifs_ioctl_copychunk()
|
| /linux/drivers/media/rc/ |
| H A D | lirc_dev.c | 826 if (fd_file(f)->f_op != &lirc_fops) in rc_dev_get_from_fd() 829 if (write && !(fd_file(f)->f_mode & FMODE_WRITE)) in rc_dev_get_from_fd() 832 fh = fd_file(f)->private_data; in rc_dev_get_from_fd()
|