| /linux/security/landlock/ |
| H A D | syscalls.c | 306 if (fd_file(ruleset_f)->f_op != &ruleset_fops) in get_path_from_fd() 308 if (!(fd_file(ruleset_f)->f_mode & mode)) in get_path_from_fd() 310 ruleset = fd_file(ruleset_f)->private_data; in get_path_from_fd() 336 if ((fd_file(f)->f_op == &ruleset_fops) || in add_rule_path_beneath() 337 (fd_file(f)->f_path.mnt->mnt_flags & MNT_INTERNAL) || in add_rule_path_beneath() 338 (fd_file(f)->f_path.dentry->d_sb->s_flags & SB_NOUSER) || in add_rule_path_beneath() 339 IS_PRIVATE(d_backing_inode(fd_file(f)->f_path.dentry))) in add_rule_path_beneath() 342 *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( 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() 356 return sync_file_range(fd_file(f), offset, nbytes, flags); in ksys_sync_file_range()
|
| H A D | eventpoll.c | 2722 efd.file = fd_file(tf); 2724 return do_epoll_ctl_file(fd_file(f), op, &efd, epds, nonblock); 2800 ret = ep_check_params(fd_file(f), events, maxevents); 2808 ep = fd_file(f)->private_data;
|
| 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 | 488 if (fd_file(f)->f_op != &timerfd_fops) in do_timerfd_settime() 491 ctx = fd_file(f)->private_data; in do_timerfd_settime() 552 if (fd_file(f)->f_op != &timerfd_fops) in SYSCALL_DEFINE4() 554 ctx = fd_file(f)->private_data; in SYSCALL_DEFINE4()
|
| 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()
|
| /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/fs/xfs/ |
| H A D | xfs_ioctl.c | 975 if (!(fd_file(f)->f_mode & FMODE_WRITE) || in xfs_ioc_swapext() 976 !(fd_file(f)->f_mode & FMODE_READ) || in xfs_ioc_swapext() 977 (fd_file(f)->f_flags & O_APPEND)) in xfs_ioc_swapext() 984 if (!(fd_file(tmp)->f_mode & FMODE_WRITE) || in xfs_ioc_swapext() 985 !(fd_file(tmp)->f_mode & FMODE_READ) || in xfs_ioc_swapext() 986 (fd_file(tmp)->f_flags & O_APPEND)) in xfs_ioc_swapext() 989 if (IS_SWAPFILE(file_inode(fd_file(f))) || in xfs_ioc_swapext() 990 IS_SWAPFILE(file_inode(fd_file(tmp)))) in xfs_ioc_swapext() 998 if (fd_file(f)->f_op != &xfs_file_operations || in xfs_ioc_swapext() 999 fd_file(tm in xfs_ioc_swapext() [all...] |
| /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 | 990 fmode_t mode = fd_file(f)->f_mode; in map_get_sys_perms() 1883 err = bpf_map_update_value(map, fd_file(f), key, value, attr->flags); in map_get_next_key() 2670 if (fd_file(f)->f_op != &bpf_prog_fops) in bpf_prog_load_check_attach() 2673 prog = fd_file(f)->private_data; in bpf_prog_load_check_attach() 3616 if (fd_file(f)->f_op != &bpf_link_fops && fd_file(f)->f_op != &bpf_link_fops_poll) in bpf_tracing_prog_attach() 3619 link = fd_file(f)->private_data; in bpf_tracing_prog_attach() 5596 if (fd_file(f)->f_op == &bpf_prog_fops) 5597 return bpf_prog_get_info_by_fd(fd_file(f), fd_file( [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 | 133 eventfd = eventfd_ctx_fileget(fd_file(f)); in acrn_irqfd_assign() 163 events = vfs_poll(fd_file(f), &irqfd->pt); in acrn_irqfd_assign()
|
| /linux/virt/kvm/ |
| H A D | vfio.c | 200 if (kvf->file == fd_file(f)) { in kvm_vfio_file_del() 228 if (kvf->file != fd_file(f)) in kvm_vfio_file_set_spapr_tce()
|
| /linux/net/ |
| H A D | socket.c | 1943 sock = sock_from_file(fd_file(f)); 1985 sock = sock_from_file(fd_file(f)); in __sys_listen_socket() 2090 return __sys_accept4_file(fd_file(f), upeer_sockaddr, 2154 return __sys_connect_file(fd_file(f), &address, addrlen, 0); in __sys_connect() 2194 sock = sock_from_file(fd_file(f)); 2232 sock = sock_from_file(fd_file(f)); in __sys_sendto() 2296 sock = sock_from_file(fd_file(f)); in __sys_recvfrom() 2389 sock = sock_from_file(fd_file(f)); 2501 sock = sock_from_file(fd_file(f)); 2537 sock = sock_from_file(fd_file( in __sys_shutdown_sock() [all...] |
| /linux/fs/smb/client/ |
| H A D | ioctl.c | 206 if (fd_file(src_file)->f_op->unlocked_ioctl != cifs_ioctl) { in cifs_shutdown() 212 src_inode = file_inode(fd_file(src_file)); in cifs_shutdown() 217 rc = cifs_file_copychunk_range(xid, fd_file(src_file), 0, dst_file, 0, in cifs_shutdown()
|
| /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()
|