Home
last modified time | relevance | path

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

123

/linux/fs/
H A Dread_write.c384 loff_t res = vfs_llseek(fd_file(f), offset, whence); in default_llseek()
420 offset = vfs_llseek(fd_file(f), ((loff_t) offset_high << 32) | offset_low, in COMPAT_SYSCALL_DEFINE3()
424 if (offset >= 0 || (unsigned_offsets(fd_file(f)) && offset < -MAX_ERRNO)) {
691 loff_t pos, *ppos = file_ppos(fd_file(f)); in vfs_write()
696 ret = vfs_read(fd_file(f), buf, count, ppos); in vfs_write()
698 fd_file(f)->f_pos = pos;
714 loff_t pos, *ppos = file_ppos(fd_file(f)); in ksys_read()
719 ret = vfs_write(fd_file(f), buf, count, ppos); in ksys_read()
721 fd_file(f)->f_pos = pos; in ksys_read()
740 if (pos < 0 && !unsigned_offsets(fd_file( in ksys_write()
[all...]
H A Dioctl.c240 cloned = vfs_clone_file_range(fd_file(src_file), off, dst_file, destoff, in ioctl_file_clone()
592 error = security_file_ioctl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3()
596 error = do_vfs_ioctl(fd_file(f), fd, cmd, arg); in SYSCALL_DEFINE3()
598 error = vfs_ioctl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3()
648 error = security_file_ioctl_compat(fd_file(f), cmd, arg); in COMPAT_SYSCALL_DEFINE3()
655 error = ioctl_file_clone(fd_file(f), arg, 0, 0, 0); in COMPAT_SYSCALL_DEFINE3()
662 error = compat_ioctl_preallocate(fd_file(f), 0, compat_ptr(arg)); in COMPAT_SYSCALL_DEFINE3()
666 error = compat_ioctl_preallocate(fd_file(f), FALLOC_FL_PUNCH_HOLE, in COMPAT_SYSCALL_DEFINE3()
670 error = compat_ioctl_preallocate(fd_file(f), FALLOC_FL_ZERO_RANGE, in COMPAT_SYSCALL_DEFINE3()
690 error = do_vfs_ioctl(fd_file( in COMPAT_SYSCALL_DEFINE3()
[all...]
H A Dfcntl.c414 return fd_file(f) == filp; in f_dupfd_query()
598 if (unlikely(fd_file(f)->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3()
603 err = security_file_fcntl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3()
605 err = do_fcntl(fd, cmd, arg, fd_file(f)); in SYSCALL_DEFINE3()
622 if (unlikely(fd_file(f)->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3()
627 err = security_file_fcntl(fd_file(f), cmd, arg); in SYSCALL_DEFINE3()
637 err = fcntl_getlk64(fd_file(f), cmd, &flock); in SYSCALL_DEFINE3()
648 err = fcntl_setlk64(fd, fd_file(f), cmd, &flock); in SYSCALL_DEFINE3()
651 err = do_fcntl(fd, cmd, arg, fd_file(f)); in SYSCALL_DEFINE3()
756 if (unlikely(fd_file(f)->f_mode & FMODE_PATH)) { in do_compat_fcntl64()
[all …]
H A Dreaddir.c234 error = iterate_dir(fd_file(f), &buf.ctx); in SYSCALL_DEFINE3()
324 error = iterate_dir(fd_file(f), &buf.ctx); in SYSCALL_DEFINE3()
404 error = iterate_dir(fd_file(f), &buf.ctx); in SYSCALL_DEFINE3()
481 error = iterate_dir(fd_file(f), &buf.ctx); in COMPAT_SYSCALL_DEFINE3()
564 error = iterate_dir(fd_file(f), &buf.ctx); in COMPAT_SYSCALL_DEFINE3()
H A Dopen.c206 return do_ftruncate(fd_file(f), length, flags); in ksys_ftruncate()
362 return vfs_fallocate(fd_file(f), mode, offset, len); in ksys_fallocate()
582 if (!d_can_lookup(fd_file(f)->f_path.dentry)) in SYSCALL_DEFINE1()
585 error = file_permission(fd_file(f), MAY_EXEC | MAY_CHDIR); in SYSCALL_DEFINE1()
587 set_fs_pwd(current->fs, &fd_file(f)->f_path); in SYSCALL_DEFINE1()
646 if (!d_can_lookup(fd_file(f)->f_path.dentry)) in SYSCALL_DEFINE2()
649 error = file_permission(fd_file(f), MAY_EXEC | MAY_CHDIR); in SYSCALL_DEFINE2()
656 path = fd_file(f)->f_path; in SYSCALL_DEFINE2()
713 return vfs_fchmod(fd_file(f), mode); in SYSCALL_DEFINE2()
902 return vfs_fchown(fd_file( in ksys_fchown()
[all...]
H A Dsplice.c1542 if (fd_file(f)->f_mode & FMODE_WRITE) in vmsplice_to_user()
1544 else if (fd_file(f)->f_mode & FMODE_READ) in vmsplice_to_user()
1557 error = vmsplice_to_pipe(fd_file(f), &iter, flags);
1559 error = vmsplice_to_user(fd_file(f), &iter, flags);
1583 return __do_splice(fd_file(in), off_in, fd_file(out), off_out, in vmsplice_to_pipe()
1953 return do_tee(fd_file(in), fd_file(out), len, flags); in link_pipe()
/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, star in fd_execute_sync_cache()
[all...]
H A Dtarget_core_file.h40 struct file *fd_file; member
/linux/security/landlock/
H A Dsyscalls.c342 if (fd_file(ruleset_f)->f_op != &ruleset_fops) in get_path_from_fd()
344 if (!(fd_file(ruleset_f)->f_mode & mode)) in get_path_from_fd()
346 ruleset = fd_file(ruleset_f)->private_data; in get_path_from_fd()
370 if ((fd_file(f)->f_op == &ruleset_fops) || in add_rule_path_beneath()
371 (fd_file(f)->f_path.mnt->mnt_flags & MNT_INTERNAL) || in add_rule_path_beneath()
372 (fd_file(f)->f_path.dentry->d_sb->s_flags & SB_NOUSER) || in add_rule_path_beneath()
373 IS_PRIVATE(d_backing_inode(fd_file(f)->f_path.dentry))) in add_rule_path_beneath()
376 *path = fd_file(f)->f_path; in add_rule_path_beneath()
/linux/tools/testing/selftests/coredump/
H A Dcoredump_socket_protocol_test.c1303 int fd_file = -1; in TEST_F() local
1326 fd_file = creat("/tmp/coredump.file", 0644); in TEST_F()
1327 if (fd_file < 0) in TEST_F()
1344 if (recv_coredump_records(fd_coredump, fd_file, NULL, NULL, -1) < 0) in TEST_F()
1349 if (fd_file >= 0) in TEST_F()
1350 close(fd_file); in TEST_F()
1417 int fd_file = -1; in check_record_dump() local
1448 fd_file = open_coredump_tmpfile(self->fd_tmpfs_detached); in check_record_dump()
1449 if (fd_file < 0) in check_record_dump()
1464 ret = recv_coredump_records(fd_coredump, fd_file, &size, &is_truncated, in check_record_dump()
[all …]
/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()
230 if (fd_file(f)->f_op != &bpf_token_fops) in bpf_token_get_from_fd()
233 token = fd_file(f)->private_data; in bpf_token_get_from_fd()
/linux/fs/proc/
H A Dfd.c179 struct file *fd_file; in proc_fd_link() local
181 fd_file = fget_task(task, fd); in proc_fd_link()
182 if (fd_file) { in proc_fd_link()
183 *path = fd_file->f_path; in proc_fd_link()
184 path_get(&fd_file->f_path); in proc_fd_link()
186 fput(fd_file); in proc_fd_link()
/linux/ipc/
H A Dmqueue.c1071 inode = file_inode(fd_file(f)); in do_mq_timedsend()
1072 if (unlikely(fd_file(f)->f_op != &mqueue_file_operations)) in do_mq_timedsend()
1075 audit_file(fd_file(f)); in do_mq_timedsend()
1077 if (unlikely(!(fd_file(f)->f_mode & FMODE_WRITE))) in do_mq_timedsend()
1111 if (fd_file(f)->f_flags & O_NONBLOCK) { in do_mq_timedsend()
1171 inode = file_inode(fd_file(f)); in do_mq_timedreceive()
1172 if (unlikely(fd_file(f)->f_op != &mqueue_file_operations)) in do_mq_timedreceive()
1175 audit_file(fd_file(f)); in do_mq_timedreceive()
1177 if (unlikely(!(fd_file(f)->f_mode & FMODE_READ))) in do_mq_timedreceive()
1203 if (fd_file(f)->f_flags & O_NONBLOCK) { in do_mq_timedreceive()
[all …]
/linux/include/linux/
H A Dfile.h45 #define fd_file(f) ((struct file *)((f).word & ~(FDPUT_FPUT|FDPUT_POS_UNLOCK))) macro
64 fput(fd_file(fd)); in fdput()
80 __f_unlock_pos(fd_file(f)); in fdput_pos()
/linux/fs/xfs/
H A Dxfs_ioctl.c990 if (!(fd_file(f)->f_mode & FMODE_WRITE) || in xfs_ioc_swapext()
991 !(fd_file(f)->f_mode & FMODE_READ) || in xfs_ioc_swapext()
992 (fd_file(f)->f_flags & O_APPEND)) in xfs_ioc_swapext()
999 if (!(fd_file(tmp)->f_mode & FMODE_WRITE) || in xfs_ioc_swapext()
1000 !(fd_file(tmp)->f_mode & FMODE_READ) || in xfs_ioc_swapext()
1001 (fd_file(tmp)->f_flags & O_APPEND)) in xfs_ioc_swapext()
1004 if (IS_SWAPFILE(file_inode(fd_file(f))) || in xfs_ioc_swapext()
1005 IS_SWAPFILE(file_inode(fd_file(tmp)))) in xfs_ioc_swapext()
1013 if (fd_file(f)->f_op != &xfs_file_operations || in xfs_ioc_swapext()
1014 fd_file(tm in xfs_ioc_swapext()
[all...]
/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.c144 if (!io_is_uring_fops(fd_file(f))) in io_get_sq_data()
147 ctx_attach = fd_file(f)->private_data; in io_get_sq_data()
496 if (!io_is_uring_fops(fd_file(f))) in io_sq_offload_create()
/linux/kernel/
H A Dnsproxy.c585 if (proc_ns_file(fd_file(f))) { in SYSCALL_DEFINE2()
586 ns = get_proc_ns(file_inode(fd_file(f))); in SYSCALL_DEFINE2()
590 } else if (!IS_ERR(pidfd_pid(fd_file(f)))) { in SYSCALL_DEFINE2()
602 if (proc_ns_file(fd_file(f))) in SYSCALL_DEFINE2()
605 err = validate_nsset(&nsset, pidfd_pid(fd_file(f))); in SYSCALL_DEFINE2()
/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.c205 if (kvf->file == fd_file(f)) { in kvm_vfio_file_del()
233 if (kvf->file != fd_file(f)) in kvm_vfio_file_set_spapr_tce()
/linux/net/
H A Dsocket.c1970 sock = sock_from_file(fd_file(f)); in __sys_bind()
2012 sock = sock_from_file(fd_file(f)); in __sys_listen()
2117 return __sys_accept4_file(fd_file(f), upeer_sockaddr, in __sys_accept4()
2185 return __sys_connect_file(fd_file(f), &address, addrlen, 0);
2225 sock = sock_from_file(fd_file(f)); in __sys_getsockname()
2263 sock = sock_from_file(fd_file(f)); in __sys_sendto()
2327 sock = sock_from_file(fd_file(f)); in __sys_recvfrom()
2420 sock = sock_from_file(fd_file(f)); in __sys_setsockopt()
2532 sock = sock_from_file(fd_file(f)); in __sys_getsockopt()
2568 sock = sock_from_file(fd_file( in __sys_shutdown()
[all...]

123