/linux-6.6.21/fs/ |
D | file_table.c | 69 if (unlikely(f->f_mode & FMODE_BACKING)) in file_free_rcu() 78 if (unlikely(f->f_mode & FMODE_BACKING)) in file_free() 80 if (likely(!(f->f_mode & FMODE_NOACCOUNT))) in file_free() 172 f->f_mode = OPEN_FMODE(flags); in init_file() 250 f->f_mode |= FMODE_NOACCOUNT; in alloc_empty_file_noaccount() 277 ff->file.f_mode |= FMODE_BACKING | FMODE_NOACCOUNT; in alloc_empty_backing_file() 303 file->f_mode |= FMODE_LSEEK; in alloc_file() 304 if ((file->f_mode & FMODE_READ) && in alloc_file() 306 file->f_mode |= FMODE_CAN_READ; in alloc_file() 307 if ((file->f_mode & FMODE_WRITE) && in alloc_file() [all …]
|
D | read_write.c | 39 return file->f_mode & FMODE_UNSIGNED_OFFSET; in unsigned_offsets() 287 if (!(file->f_mode & FMODE_LSEEK)) in vfs_llseek() 414 if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ))) in __kernel_read() 416 if (!(file->f_mode & FMODE_CAN_READ)) in __kernel_read() 454 if (!(file->f_mode & FMODE_READ)) in vfs_read() 456 if (!(file->f_mode & FMODE_CAN_READ)) in vfs_read() 504 if (WARN_ON_ONCE(!(file->f_mode & FMODE_WRITE))) in __kernel_write_iter() 506 if (!(file->f_mode & FMODE_CAN_WRITE)) in __kernel_write_iter() 568 if (!(file->f_mode & FMODE_WRITE)) in vfs_write() 570 if (!(file->f_mode & FMODE_CAN_WRITE)) in vfs_write() [all …]
|
D | open.c | 179 if (!S_ISREG(inode->i_mode) || !(f.file->f_mode & FMODE_WRITE)) in do_sys_ftruncate() 281 if (!(file->f_mode & FMODE_WRITE)) in vfs_fallocate() 887 f->f_mode = FMODE_PATH | FMODE_OPENED; in do_dentry_open() 892 if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) { in do_dentry_open() 894 } else if (f->f_mode & FMODE_WRITE && !special_file(inode->i_mode)) { in do_dentry_open() 903 f->f_mode |= FMODE_WRITER; in do_dentry_open() 908 f->f_mode |= FMODE_ATOMIC_POS; in do_dentry_open() 925 f->f_mode |= FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE; in do_dentry_open() 933 f->f_mode |= FMODE_OPENED; in do_dentry_open() 934 if ((f->f_mode & FMODE_READ) && in do_dentry_open() [all …]
|
D | pipe.c | 663 if (filp->f_mode & FMODE_READ) in pipe_poll() 665 if (filp->f_mode & FMODE_WRITE) in pipe_poll() 677 if (filp->f_mode & FMODE_READ) { in pipe_poll() 684 if (filp->f_mode & FMODE_WRITE) { in pipe_poll() 719 if (file->f_mode & FMODE_READ) in pipe_release() 721 if (file->f_mode & FMODE_WRITE) in pipe_release() 744 if (filp->f_mode & FMODE_READ) in pipe_fasync() 746 if ((filp->f_mode & FMODE_WRITE) && retval >= 0) { in pipe_fasync() 748 if (retval < 0 && (filp->f_mode & FMODE_READ)) in pipe_fasync() 979 files[0]->f_mode |= FMODE_NOWAIT; in __do_pipe_flags() [all …]
|
D | splice.c | 50 fmode_t fmode = READ_ONCE(file->f_mode); in pipe_clear_nowait() 55 } while (!try_cmpxchg(&file->f_mode, &fmode, fmode & ~FMODE_NOWAIT)); in pipe_clear_nowait() 969 if (unlikely(!(in->f_mode & FMODE_READ))) in vfs_splice_read() 1023 if (unlikely(!(in->f_mode & FMODE_LSEEK))) in splice_direct_to_actor() 1184 if (unlikely(!(out->f_mode & FMODE_WRITE))) in do_splice_direct() 1251 if (unlikely(!(in->f_mode & FMODE_READ) || in do_splice() 1252 !(out->f_mode & FMODE_WRITE))) in do_splice() 1274 if (!(out->f_mode & FMODE_PWRITE)) in do_splice() 1303 if (!(in->f_mode & FMODE_PREAD)) in do_splice() 1505 if (f.file->f_mode & FMODE_WRITE) { in vmsplice_type() [all …]
|
D | internal.h | 100 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) { in put_file_access() 102 } else if (file->f_mode & FMODE_WRITER) { in put_file_access()
|
/linux-6.6.21/tools/testing/selftests/bpf/progs/ |
D | test_subprogs_extable.c | 25 *(volatile int *)&ret->f_mode; in BPF_PROG() 35 *(volatile int *)&ret->f_mode; in BPF_PROG() 45 *(volatile int *)&ret->f_mode; in BPF_PROG()
|
/linux-6.6.21/fs/proc/ |
D | fd.c | 118 *mode = file->f_mode; in tid_fd_mode() 124 fmode_t f_mode) in tid_fd_update_inode() argument 130 if (f_mode & FMODE_READ) in tid_fd_update_inode() 132 if (f_mode & FMODE_WRITE) in tid_fd_update_inode() 153 fmode_t f_mode; in tid_fd_revalidate() local 154 if (tid_fd_mode(task, fd, &f_mode)) { in tid_fd_revalidate() 155 tid_fd_update_inode(task, inode, f_mode); in tid_fd_revalidate() 266 data.mode = f->f_mode; in proc_readfd_common()
|
/linux-6.6.21/sound/oss/dmasound/ |
D | dmasound_core.c | 679 if (file->f_mode & FMODE_WRITE ) in sq_poll() 681 if (file->f_mode & FMODE_WRITE) in sq_poll() 700 if (file->f_mode & mode) { 712 if (file->f_mode & mode) { in sq_open2() 771 if (file->f_mode & FMODE_READ) { in sq_open() 778 dmasound.mach.sq_open(file->f_mode); in sq_open() 882 if (file->f_mode & FMODE_WRITE) { in sq_release() 891 if (file->f_mode & shared_resource_owner) { /* it's us that has them */ in sq_release() 1010 if (file->f_mode & FMODE_WRITE) { in sq_ioctl() 1031 if (file->f_mode & FMODE_WRITE) { in sq_ioctl() [all …]
|
/linux-6.6.21/mm/ |
D | fadvise.c | 82 file->f_mode &= ~(FMODE_RANDOM | FMODE_NOREUSE); in generic_fadvise() 87 file->f_mode |= FMODE_RANDOM; in generic_fadvise() 93 file->f_mode &= ~FMODE_RANDOM; in generic_fadvise() 110 file->f_mode |= FMODE_NOREUSE; in generic_fadvise()
|
/linux-6.6.21/kernel/trace/ |
D | trace_recursion_record.c | 187 if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) { in recursed_function_open() 196 if (file->f_mode & FMODE_READ) in recursed_function_open() 212 if (file->f_mode & FMODE_READ) in recursed_function_release()
|
/linux-6.6.21/arch/um/drivers/ |
D | hostaudio_kern.c | 191 if (file->f_mode & FMODE_READ) in hostaudio_open() 193 if (file->f_mode & FMODE_WRITE) in hostaudio_open() 252 if (file->f_mode & FMODE_READ) in hostmixer_open_mixdev() 254 if (file->f_mode & FMODE_WRITE) in hostmixer_open_mixdev()
|
/linux-6.6.21/fs/ext4/ |
D | dir.c | 335 if ((filp->f_mode & FMODE_32BITHASH) || in hash2pos() 336 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in hash2pos() 344 if ((filp->f_mode & FMODE_32BITHASH) || in pos2maj_hash() 345 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2maj_hash() 353 if ((filp->f_mode & FMODE_32BITHASH) || in pos2min_hash() 354 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2min_hash() 365 if ((filp->f_mode & FMODE_32BITHASH) || in ext4_get_htree_eof() 366 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in ext4_get_htree_eof()
|
/linux-6.6.21/drivers/char/xillybus/ |
D | xillybus_core.c | 1179 if (!(filp->f_mode & FMODE_WRITE)) in xillybus_flush() 1451 if ((filp->f_mode & FMODE_READ) && (!channel->num_wr_buffers)) in xillybus_open() 1454 if ((filp->f_mode & FMODE_WRITE) && (!channel->num_rd_buffers)) in xillybus_open() 1457 if ((filp->f_mode & FMODE_READ) && (filp->f_flags & O_NONBLOCK) && in xillybus_open() 1465 if ((filp->f_mode & FMODE_WRITE) && (filp->f_flags & O_NONBLOCK) && in xillybus_open() 1479 if (filp->f_mode & FMODE_READ) { in xillybus_open() 1485 if (filp->f_mode & FMODE_WRITE) { in xillybus_open() 1491 if ((filp->f_mode & FMODE_READ) && in xillybus_open() 1498 if ((filp->f_mode & FMODE_WRITE) && in xillybus_open() 1505 if (filp->f_mode & FMODE_READ) { in xillybus_open() [all …]
|
D | xillyusb.c | 1269 if (((filp->f_mode & FMODE_READ) && !chan->readable) || in xillyusb_open() 1270 ((filp->f_mode & FMODE_WRITE) && !chan->writable)) in xillyusb_open() 1273 if ((filp->f_flags & O_NONBLOCK) && (filp->f_mode & FMODE_READ) && in xillyusb_open() 1280 if ((filp->f_flags & O_NONBLOCK) && (filp->f_mode & FMODE_WRITE) && in xillyusb_open() 1289 if (((filp->f_mode & FMODE_READ) && chan->open_for_read) || in xillyusb_open() 1290 ((filp->f_mode & FMODE_WRITE) && chan->open_for_write)) in xillyusb_open() 1293 if (filp->f_mode & FMODE_READ) in xillyusb_open() 1296 if (filp->f_mode & FMODE_WRITE) in xillyusb_open() 1301 if (filp->f_mode & FMODE_WRITE) { in xillyusb_open() 1341 if (filp->f_mode & FMODE_READ) { in xillyusb_open() [all …]
|
/linux-6.6.21/drivers/sbus/char/ |
D | openprom.c | 582 if ((file->f_mode & FMODE_READ) == 0) in openprom_ioctl() 589 if ((file->f_mode & FMODE_WRITE) == 0) in openprom_ioctl() 598 if ((file->f_mode & FMODE_READ) == 0) in openprom_ioctl() 610 if ((file->f_mode & FMODE_READ) == 0) in openprom_ioctl() 619 if ((file->f_mode & FMODE_READ) == 0) in openprom_ioctl() 624 if ((file->f_mode & FMODE_WRITE) == 0) in openprom_ioctl()
|
/linux-6.6.21/security/apparmor/include/ |
D | file.h | 149 if (file->f_mode & FMODE_WRITE) in aa_map_file_to_perms() 151 if (file->f_mode & FMODE_READ) in aa_map_file_to_perms()
|
/linux-6.6.21/kernel/time/ |
D | posix-clock.c | 121 err = clk->ops.open(clk, fp->f_mode); in posix_clock_open() 235 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_adjtime() 297 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_settime()
|
/linux-6.6.21/drivers/char/ |
D | nvram.c | 364 (file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE)) { in nvram_misc_open() 372 if (file->f_mode & FMODE_WRITE) in nvram_misc_open() 390 if (file->f_mode & FMODE_WRITE) in nvram_misc_release()
|
/linux-6.6.21/fs/9p/ |
D | vfs_dir.c | 218 if ((S_ISREG(inode->i_mode)) && (filp->f_mode & FMODE_WRITE)) in v9fs_dir_release() 228 if ((filp->f_mode & FMODE_WRITE)) { in v9fs_dir_release()
|
/linux-6.6.21/drivers/usb/gadget/function/ |
D | storage_common.c | 205 if (!(filp->f_mode & FMODE_WRITE)) in fsg_lun_open() 218 if (!(filp->f_mode & FMODE_CAN_READ)) { in fsg_lun_open() 222 if (!(filp->f_mode & FMODE_CAN_WRITE)) in fsg_lun_open()
|
/linux-6.6.21/include/linux/ |
D | posix-clock.h | 56 int (*open) (struct posix_clock *pc, fmode_t f_mode);
|
/linux-6.6.21/arch/x86/kernel/ |
D | msr.c | 157 if (!(file->f_mode & FMODE_READ)) { in msr_ioctl() 173 if (!(file->f_mode & FMODE_WRITE)) { in msr_ioctl()
|
/linux-6.6.21/fs/nfs/ |
D | nfs4file.c | 92 filp->f_mode |= FMODE_CAN_ODIRECT; in nfs4_file_open() 118 if ((file->f_mode & FMODE_WRITE) == 0) in nfs4_file_flush() 384 update_open_stateid(ctx->state, stateid, NULL, filep->f_mode); in __nfs42_ssc_open()
|
/linux-6.6.21/fs/afs/ |
D | file.c | 156 if (file->f_mode & FMODE_WRITE) { in afs_open() 165 fscache_use_cookie(afs_vnode_cache(vnode), file->f_mode & FMODE_WRITE); in afs_open() 193 if ((file->f_mode & FMODE_WRITE)) in afs_release() 200 if ((file->f_mode & FMODE_WRITE)) { in afs_release()
|