Home
last modified time | relevance | path

Searched refs:fd_file (Results 1 – 25 of 48) sorted by relevance

12

/linux/security/landlock/
H A Dsyscalls.c318 if (fd_file(ruleset_f)->f_op != &ruleset_fops) in add_rule_path_beneath()
320 if (!(fd_file(ruleset_f)->f_mode & mode)) in add_rule_path_beneath()
322 ruleset = fd_file(ruleset_f)->private_data; in add_rule_path_beneath()
346 if ((fd_file(f)->f_op == &ruleset_fops) || in add_rule_path_beneath()
347 (fd_file(f)->f_path.mnt->mnt_flags & MNT_INTERNAL) || in add_rule_path_beneath()
348 (fd_file(f)->f_path.dentry->d_sb->s_flags & SB_NOUSER) || in add_rule_path_beneath()
349 IS_PRIVATE(d_backing_inode(fd_file(f)->f_path.dentry))) in add_rule_path_beneath()
352 *path = fd_file(f)->f_path; in add_rule_net_port()
/linux/fs/
H A Dioctl.c239 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 Dsplice.c1593 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 Dsignalfd.c286 ctx = fd_file(f)->private_data; in do_signalfd4()
287 if (fd_file(f)->f_op != &signalfd_fops) in do_signalfd4()
H A Dfsopen.c403 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 Dtarget_core_file.c91 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 Dtarget_core_file.h40 struct file *fd_file; member
/linux/kernel/bpf/
H A Dbpf_inode_storage.c84 sdata = inode_storage_lookup(file_inode(fd_file(f)), map, true); in bpf_fd_inode_storage_lookup_elem()
96 if (!inode_storage_ptr(file_inode(fd_file(f)))) in bpf_fd_inode_storage_update_elem()
99 sdata = bpf_local_storage_update(file_inode(fd_file(f)), in bpf_fd_inode_storage_update_elem()
122 return inode_storage_delete(file_inode(fd_file(f)), map); in bpf_fd_inode_storage_delete_elem()
H A Dtoken.c127 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 Dsyscall.c988 fmode_t mode = fd_file(f)->f_mode; in map_get_sys_perms()
1886 err = bpf_map_update_value(map, fd_file(f), key, value, attr->flags); in map_update_elem()
2673 if (fd_file(f)->f_op != &bpf_prog_fops) in __bpf_prog_get()
2676 prog = fd_file(f)->private_data; in __bpf_prog_get()
3559 if (fd_file(f)->f_op != &bpf_link_fops && fd_file(f)->f_op != &bpf_link_fops_poll) in bpf_link_get_from_fd()
3562 link = fd_file(f)->private_data; in bpf_link_get_from_fd()
5545 if (fd_file(f)->f_op == &bpf_prog_fops) in bpf_obj_get_info_by_fd()
5546 return bpf_prog_get_info_by_fd(fd_file(f), fd_file(f)->private_data, attr, in bpf_obj_get_info_by_fd()
5548 else if (fd_file(f)->f_op == &bpf_map_fops) in bpf_obj_get_info_by_fd()
5549 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/ipc/
H A Dmqueue.c1064 inode = file_inode(fd_file(f)); in do_mq_timedsend()
1065 if (unlikely(fd_file(f)->f_op != &mqueue_file_operations)) in do_mq_timedsend()
1068 audit_file(fd_file(f)); in do_mq_timedsend()
1070 if (unlikely(!(fd_file(f)->f_mode & FMODE_WRITE))) in do_mq_timedsend()
1104 if (fd_file(f)->f_flags & O_NONBLOCK) { in do_mq_timedsend()
1164 inode = file_inode(fd_file(f)); in do_mq_timedreceive()
1165 if (unlikely(fd_file(f)->f_op != &mqueue_file_operations)) in do_mq_timedreceive()
1168 audit_file(fd_file(f)); in do_mq_timedreceive()
1170 if (unlikely(!(fd_file(f)->f_mode & FMODE_READ))) in do_mq_timedreceive()
1196 if (fd_file( in do_mq_timedreceive()
[all...]
/linux/include/linux/
H A Dfile.h44 #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 Dspu_syscalls.c72 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/io_uring/
H A Depoll.c66 key.file = fd_file(tf); in io_epoll_ctl()
68 ret = do_epoll_ctl_file(fd_file(f), ie->op, &key, &ie->event, force_nonblock); in io_epoll_ctl()
H A Dsqpoll.c126 if (!io_is_uring_fops(fd_file(f))) in io_attach_sq_data()
129 ctx_attach = fd_file(f)->private_data; in io_attach_sq_data()
452 if (!io_is_uring_fops(fd_file(f))) in io_sq_offload_create()
H A Dmsg_ring.c354 if (!io_is_uring_fops(fd_file(f))) in io_uring_sync_msg_ring()
356 return __io_msg_ring_data(fd_file(f)->private_data, in io_uring_sync_msg_ring()
/linux/arch/arm/kernel/
H A Dsys_oabi-compat.c248 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 Dvirqfd.c141 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/fs/notify/inotify/
H A Dinotify_user.c751 if (unlikely(fd_file(f)->f_op != &inotify_fops)) in SYSCALL_DEFINE3()
766 group = fd_file(f)->private_data; in SYSCALL_DEFINE3()
784 if (unlikely(fd_file(f)->f_op != &inotify_fops)) in SYSCALL_DEFINE2()
787 group = fd_file(f)->private_data; in SYSCALL_DEFINE2()
/linux/virt/kvm/
H A Dvfio.c200 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 Dsocket.c1968 sock = sock_from_file(fd_file(f)); in __sys_bind()
2010 sock = sock_from_file(fd_file(f)); in __sys_listen()
2115 return __sys_accept4_file(fd_file(f), upeer_sockaddr, in __sys_accept4()
2183 return __sys_connect_file(fd_file(f), &address, addrlen, 0); in __sys_connect()
2223 sock = sock_from_file(fd_file(f)); in __sys_getsockname()
2261 sock = sock_from_file(fd_file(f)); in __sys_sendto()
2325 sock = sock_from_file(fd_file(f)); in __sys_recvfrom()
2418 sock = sock_from_file(fd_file(f)); in __sys_setsockopt()
2530 sock = sock_from_file(fd_file(f)); in __sys_getsockopt()
2566 sock = sock_from_file(fd_file(f)); in __sys_shutdown()
[all …]
/linux/drivers/media/rc/
H A Dlirc_dev.c826 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()
/linux/kernel/
H A Dpid.c602 pid = pidfd_pid(fd_file(f)); in pidfd_get_pid()
605 *flags = fd_file(f)->f_flags; in pidfd_get_pid()
940 pid = pidfd_pid(fd_file(f)); in SYSCALL_DEFINE3()
/linux/drivers/media/mc/
H A Dmc-request.c266 if (fd_file(f)->f_op != &request_fops) in media_request_get_by_fd()
268 req = fd_file(f)->private_data; in media_request_get_by_fd()
/linux/mm/
H A Dreadahead.c733 file = fd_file(f); in ksys_readahead()
753 return vfs_fadvise(fd_file(f), offset, count, POSIX_FADV_WILLNEED); in ksys_readahead()

12