| /linux/include/linux/ |
| H A D | file.h | 148 static __always_inline void __fd_prepare_cleanup(const struct fd_prepare *fdf) in __fd_prepare_cleanup() argument 150 if (unlikely(fdf->fd >= 0)) { in __fd_prepare_cleanup() 151 put_unused_fd(fdf->fd); in __fd_prepare_cleanup() 152 fput(fdf->file); in __fd_prepare_cleanup() 196 static __always_inline int fd_publish(const struct fd_prepare *fdf) in fd_publish() argument 199 struct fd_prepare *guard = (struct fd_prepare *)fdf; in fd_publish()
|
| /linux/net/handshake/ |
| H A D | netlink.c | 109 FD_PREPARE(fdf, O_CLOEXEC, req->hr_file); in handshake_nl_accept_doit() 110 if (fdf->fd < 0) { in handshake_nl_accept_doit() 112 err = fdf->fd; in handshake_nl_accept_doit() 116 err = req->hr_proto->hp_accept(req, info, fdf->fd); in handshake_nl_accept_doit() 120 trace_handshake_cmd_accept(net, req, req->hr_sk, fdf->fd); in handshake_nl_accept_doit() 121 fd_publish(fdf); in handshake_nl_accept_doit()
|
| /linux/kernel/bpf/ |
| H A D | token.c | 169 FD_PREPARE(fdf, O_CLOEXEC, in bpf_token_create() 172 if (fdf->fd < 0) { in bpf_token_create() 175 return fdf->fd; in bpf_token_create() 196 fdf->file->private_data = no_free_ptr(token); 197 return fd_publish(fdf); in bpf_token_get_info_by_fd()
|
| H A D | bpf_iter.c | 670 FD_PREPARE(fdf, flags, anon_inode_getfile("bpf_iter", &bpf_iter_fops, NULL, flags)); in bpf_iter_get_info() 671 if (fdf->fd < 0) in bpf_iter_get_info() 672 return fdf->fd; in bpf_iter_get_info() 675 err = prepare_seq_file(fdf->file, iter_link); in bpf_iter_get_info() 679 return fd_publish(fdf);
|
| /linux/io_uring/ |
| H A D | mock_file.c | 257 FD_PREPARE(fdf, O_RDWR | O_CLOEXEC, in io_create_mock_file() 260 if (fdf->fd < 0) in io_create_mock_file() 261 return fdf->fd; in io_create_mock_file() 264 file = fdf->file; in io_create_mock_file() 270 mc.out_fd = fdf->fd; in io_create_mock_file() 274 fd_publish(fdf); in io_create_mock_file()
|
| /linux/arch/powerpc/platforms/cell/spufs/ |
| H A D | inode.c | 268 FD_PREPARE(fdf, 0, dentry_open(path, O_RDONLY, current_cred())); in spufs_context_open() 269 if (fdf->fd < 0) in spufs_context_open() 270 return fdf->fd; in spufs_context_open() 271 fdf->file->f_op = &spufs_context_fops; in spufs_context_open() 272 return fd_publish(fdf); in spufs_context_open() 501 FD_PREPARE(fdf, 0, dentry_open(path, O_RDONLY, current_cred())); in spufs_gang_open() 502 if (fdf->fd < 0) in spufs_gang_open() 503 return fdf->fd; in spufs_gang_open() 504 fdf->file->f_op = &spufs_gang_fops; in spufs_gang_open() 505 return fd_publish(fdf); in spufs_gang_open()
|
| /linux/drivers/media/mc/ |
| H A D | mc-request.c | 316 FD_PREPARE(fdf, O_CLOEXEC, in media_request_alloc() 319 if (fdf->fd < 0) { in media_request_alloc() 320 ret = fdf->fd; in media_request_alloc() 324 fdf->file->private_data = req; in media_request_alloc() 327 atomic_inc_return(&mdev->request_id), fdf->fd); in media_request_alloc() 331 *alloc_fd = fd_publish(fdf); in media_request_alloc()
|
| /linux/fs/ |
| H A D | eventfd.c | 403 FD_PREPARE(fdf, flags, in do_eventfd() 406 if (fdf->fd < 0) in do_eventfd() 407 return fdf->fd; in do_eventfd() 411 return fd_publish(fdf); in do_eventfd()
|
| H A D | nsfs.c | 350 FD_PREPARE(fdf, O_CLOEXEC, dentry_open(&path, O_RDONLY, current_cred())); in ns_ioctl() 351 if (fdf->fd < 0) in ns_ioctl() 352 return fdf->fd; in ns_ioctl() 360 ret = fd_publish(fdf); in ns_ioctl()
|
| H A D | file.c | 1547 FD_PREPARE(fdf, o_flags, file); in receive_fd() 1548 if (fdf->fd < 0) in receive_fd() 1549 return fdf->fd; in receive_fd() 1553 error = put_user(fdf->fd, ufd); in receive_fd() 1558 __receive_sock(fdf->file); in receive_fd_replace() 1559 return fd_publish(fdf); in receive_fd_replace()
|
| H A D | eventpoll.c | 2529 FD_PREPARE(fdf, O_RDWR | (flags & O_CLOEXEC), 2532 if (fdf->fd < 0) { in SYSCALL_DEFINE1() 2534 return fdf->fd; in SYSCALL_DEFINE1() 2536 ep->file = fdf->file; in SYSCALL_DEFINE1() 2537 return fd_publish(fdf);
|
| H A D | namespace.c | 4711 FD_PREPARE(fdf, (flags & FSMOUNT_CLOEXEC) ? O_CLOEXEC : 0, in SYSCALL_DEFINE3() 4713 if (fdf->fd < 0) { in SYSCALL_DEFINE3() 4715 return fdf->fd; in SYSCALL_DEFINE3() 4722 fdf->file->f_mode |= FMODE_NEED_UNMOUNT; in SYSCALL_DEFINE3() 4723 return fd_publish(fdf); in SYSCALL_DEFINE3() 5373 FD_PREPARE(fdf, flags, vfs_open_tree(dfd, filename, flags)); in SYSCALL_DEFINE5() 5374 if (fdf->fd < 0) in SYSCALL_DEFINE5() 5375 return fdf->fd; in SYSCALL_DEFINE5() 5379 struct file *file = fdf->file; in SYSCALL_DEFINE5() 5396 return fd_publish(fdf); in SYSCALL_DEFINE5() [all...] |
| /linux/net/core/ |
| H A D | scm.c | 379 FD_PREPARE(fdf, flags, get_file(f)); in scm_recv_one_fd() 380 if (fdf->fd < 0) in scm_recv_one_fd() 381 return fdf->fd; in scm_recv_one_fd() 383 error = put_user(fdf->fd, ufd); in scm_recv_one_fd() 387 __receive_sock(fdf->file); in scm_recv_one_fd() 388 return fd_publish(fdf); in scm_recv_one_fd()
|
| /linux/drivers/gpio/ |
| H A D | gpiolib-cdev.c | 378 FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC, in linehandle_create() 381 if (fdf->fd < 0) in linehandle_create() 382 return fdf->fd; in linehandle_create() 385 handlereq.fd = fdf->fd; in linehandle_create() 389 fd_publish(fdf); in linehandle_create() 1711 FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC, in linereq_create() 1714 if (fdf->fd < 0) in linereq_create() 1715 return fdf->fd; in linereq_create() 1718 ulr.fd = fdf->fd; in linereq_create() 1722 fd_publish(fdf); in linereq_create() [all...] |
| /linux/fs/xfs/ |
| H A D | xfs_handle.c | 274 FD_PREPARE(fdf, 0, dentry_open(&path, hreq->oflags, cred)); in xfs_open_by_handle() 275 if (fdf->fd < 0) in xfs_open_by_handle() 276 return fdf->fd; in xfs_open_by_handle() 279 struct file *filp = fdf->file; in xfs_open_by_handle() 285 return fd_publish(fdf); in xfs_open_by_handle()
|
| /linux/drivers/gpu/drm/msm/ |
| H A D | msm_perfcntr.c | 544 FD_PREPARE(fdf, O_CLOEXEC, in msm_ioctl_perfcntr_config() 546 if (fdf->fd < 0) in msm_ioctl_perfcntr_config() 547 return fdf->fd; in msm_ioctl_perfcntr_config() 567 stream_fd = fd_publish(fdf); in msm_ioctl_perfcntr_config()
|
| /linux/drivers/misc/ |
| H A D | ntsync.c | 725 FD_PREPARE(fdf, O_CLOEXEC, in ntsync_obj_get_fd() 727 if (fdf->fd < 0) in ntsync_obj_get_fd() 728 return fdf->fd; in ntsync_obj_get_fd() 729 obj->file = fdf->file; in ntsync_obj_get_fd() 730 return fd_publish(fdf); in ntsync_obj_get_fd()
|
| /linux/sound/firewire/ |
| H A D | amdtp-stream.h | 159 unsigned int fdf; member
|
| H A D | amdtp-am824.c | 94 s->ctx_data.rx.fdf = AMDTP_FDF_AM824 | s->sfc; in amdtp_am824_set_parameters()
|
| H A D | amdtp-stream.c | 686 ((s->ctx_data.rx.fdf << CIP_FDF_SHIFT) & CIP_FDF_MASK) | in generate_cip_header() 722 unsigned int fdf; in check_cip_header() local 753 fdf = (cip_header[1] & CIP_FDF_MASK) >> CIP_FDF_SHIFT; in check_cip_header() 754 if (payload_length == 0 || (fmt == CIP_FMT_AM && fdf == AMDTP_FDF_NO_DATA)) { in check_cip_header()
|
| /linux/net/kcm/ |
| H A D | kcmsock.c | 1592 FD_PREPARE(fdf, 0, kcm_clone(sock)); in kcm_ioctl() 1593 if (fdf->fd < 0) in kcm_ioctl() 1594 return fdf->fd; in kcm_ioctl() 1596 info.fd = fdf->fd; in kcm_ioctl() 1600 fd_publish(fdf); in kcm_ioctl()
|
| /linux/sound/firewire/digi00x/ |
| H A D | amdtp-dot.c | 130 s->ctx_data.rx.fdf = AMDTP_FDF_AM824 | s->sfc; in amdtp_dot_set_parameters()
|
| /linux/sound/firewire/motu/ |
| H A D | amdtp-motu.c | 478 s->ctx_data.rx.fdf = MOTU_FDF_AM824; in amdtp_motu_init()
|
| /linux/mm/ |
| H A D | userfaultfd.c | 4807 FD_PREPARE(fdf, flags & UFFD_SHARED_FCNTL_FLAGS, in new_userfaultfd() 4811 if (fdf->fd < 0) in new_userfaultfd() 4812 return fdf->fd; in new_userfaultfd() 4816 fdf->file->f_mode |= FMODE_NOWAIT; in new_userfaultfd() 4818 return fd_publish(fdf); in new_userfaultfd()
|
| /linux/arch/m68k/ifpsp060/ |
| H A D | fplsp.sa | 1260 dc.l $78ad690a,$43741fdf,$26103fff,$0000b123 1270 dc.l $ccda2497,$64089fdf,$137b3fff,$0000c567
|