/linux-6.12.1/fs/ |
D | file_table.c | 66 if (likely(!(f->f_mode & FMODE_NOACCOUNT))) in file_free() 69 if (unlikely(f->f_mode & FMODE_BACKING)) { in file_free() 169 f->f_mode = OPEN_FMODE(flags); in init_file() 253 f->f_mode |= FMODE_NOACCOUNT; in alloc_empty_file_noaccount() 280 ff->file.f_mode |= FMODE_BACKING | FMODE_NOACCOUNT; in alloc_empty_backing_file() 300 file->f_mode |= FMODE_LSEEK; in file_init_path() 301 if ((file->f_mode & FMODE_READ) && in file_init_path() 303 file->f_mode |= FMODE_CAN_READ; in file_init_path() 304 if ((file->f_mode & FMODE_WRITE) && in file_init_path() 306 file->f_mode |= FMODE_CAN_WRITE; in file_init_path() [all …]
|
D | read_write.c | 212 if (WARN_ON_ONCE(!(file->f_mode & FMODE_ATOMIC_POS))) in generic_llseek_cookie() 380 if (!(file->f_mode & FMODE_LSEEK)) in vfs_llseek() 513 if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ))) in __kernel_read() 515 if (!(file->f_mode & FMODE_CAN_READ)) in __kernel_read() 553 if (!(file->f_mode & FMODE_READ)) in vfs_read() 555 if (!(file->f_mode & FMODE_CAN_READ)) in vfs_read() 603 if (WARN_ON_ONCE(!(file->f_mode & FMODE_WRITE))) in __kernel_write_iter() 605 if (!(file->f_mode & FMODE_CAN_WRITE)) in __kernel_write_iter() 667 if (!(file->f_mode & FMODE_WRITE)) in vfs_write() 669 if (!(file->f_mode & FMODE_CAN_WRITE)) in vfs_write() [all …]
|
D | open.c | 168 if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE)) in do_ftruncate() 283 if (!(file->f_mode & FMODE_WRITE)) in vfs_fallocate() 893 if (unlikely(f->f_mode & FMODE_BACKING)) { in file_get_write_access() 921 f->f_mode = FMODE_PATH | FMODE_OPENED; in do_dentry_open() 926 if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) { in do_dentry_open() 928 } else if (f->f_mode & FMODE_WRITE && !special_file(inode->i_mode)) { in do_dentry_open() 932 f->f_mode |= FMODE_WRITER; in do_dentry_open() 937 f->f_mode |= FMODE_ATOMIC_POS; in do_dentry_open() 954 f->f_mode |= FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE; in do_dentry_open() 962 f->f_mode |= FMODE_OPENED; in do_dentry_open() [all …]
|
D | backing-file.c | 169 if (WARN_ON_ONCE(!(file->f_mode & FMODE_BACKING))) in backing_file_read_iter() 176 !(file->f_mode & FMODE_CAN_ODIRECT)) in backing_file_read_iter() 216 if (WARN_ON_ONCE(!(file->f_mode & FMODE_BACKING))) in backing_file_write_iter() 227 !(file->f_mode & FMODE_CAN_ODIRECT)) in backing_file_write_iter() 281 if (WARN_ON_ONCE(!(in->f_mode & FMODE_BACKING))) in backing_file_splice_read() 303 if (WARN_ON_ONCE(!(out->f_mode & FMODE_BACKING))) in backing_file_splice_write() 332 if (WARN_ON_ONCE(!(file->f_mode & FMODE_BACKING)) || in backing_file_mmap()
|
D | anon_inodes.c | 171 void *priv, int flags, fmode_t f_mode) in anon_inode_getfile_fmode() argument 177 file->f_mode |= f_mode; in anon_inode_getfile_fmode()
|
D | pipe.c | 672 if (filp->f_mode & FMODE_READ) in pipe_poll() 674 if (filp->f_mode & FMODE_WRITE) in pipe_poll() 686 if (filp->f_mode & FMODE_READ) { in pipe_poll() 693 if (filp->f_mode & FMODE_WRITE) { in pipe_poll() 728 if (file->f_mode & FMODE_READ) in pipe_release() 730 if (file->f_mode & FMODE_WRITE) in pipe_release() 753 if (filp->f_mode & FMODE_READ) in pipe_fasync() 755 if ((filp->f_mode & FMODE_WRITE) && retval >= 0) { in pipe_fasync() 757 if (retval < 0 && (filp->f_mode & FMODE_READ)) in pipe_fasync() 991 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() 965 if (unlikely(!(in->f_mode & FMODE_READ))) in do_splice_read() 1043 if (unlikely(!(in->f_mode & FMODE_LSEEK))) in splice_direct_to_actor() 1201 if (unlikely(!(out->f_mode & FMODE_WRITE))) in do_splice_direct_actor() 1313 if (unlikely(!(in->f_mode & FMODE_READ) || in do_splice() 1314 !(out->f_mode & FMODE_WRITE))) in do_splice() 1336 if (!(out->f_mode & FMODE_PWRITE)) in do_splice() 1365 if (!(in->f_mode & FMODE_PREAD)) in do_splice() 1571 if (fd_file(f)->f_mode & FMODE_WRITE) { in vmsplice_type() [all …]
|
D | internal.h | 108 if (unlikely(file->f_mode & FMODE_BACKING)) in file_put_write_access() 114 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) { in put_file_access() 116 } else if (file->f_mode & FMODE_WRITER) { in put_file_access()
|
/linux-6.12.1/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.12.1/fs/proc/ |
D | fd.c | 123 *mode = file->f_mode; in tid_fd_mode() 130 fmode_t f_mode) in tid_fd_update_inode() argument 136 if (f_mode & FMODE_READ) in tid_fd_update_inode() 138 if (f_mode & FMODE_WRITE) in tid_fd_update_inode() 159 fmode_t f_mode; in tid_fd_revalidate() local 160 if (tid_fd_mode(task, fd, &f_mode)) { in tid_fd_revalidate() 161 tid_fd_update_inode(task, inode, f_mode); in tid_fd_revalidate() 272 data.mode = f->f_mode; in proc_readfd_common()
|
/linux-6.12.1/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.12.1/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.12.1/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.12.1/fs/ext4/ |
D | dir.c | 344 if ((filp->f_mode & FMODE_32BITHASH) || in hash2pos() 345 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in hash2pos() 353 if ((filp->f_mode & FMODE_32BITHASH) || in pos2maj_hash() 354 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2maj_hash() 362 if ((filp->f_mode & FMODE_32BITHASH) || in pos2min_hash() 363 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2min_hash() 374 if ((filp->f_mode & FMODE_32BITHASH) || in ext4_get_htree_eof() 375 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in ext4_get_htree_eof()
|
/linux-6.12.1/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.12.1/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 | 1266 if (((filp->f_mode & FMODE_READ) && !chan->readable) || in xillyusb_open() 1267 ((filp->f_mode & FMODE_WRITE) && !chan->writable)) in xillyusb_open() 1270 if ((filp->f_flags & O_NONBLOCK) && (filp->f_mode & FMODE_READ) && in xillyusb_open() 1277 if ((filp->f_flags & O_NONBLOCK) && (filp->f_mode & FMODE_WRITE) && in xillyusb_open() 1286 if (((filp->f_mode & FMODE_READ) && chan->open_for_read) || in xillyusb_open() 1287 ((filp->f_mode & FMODE_WRITE) && chan->open_for_write)) in xillyusb_open() 1290 if (filp->f_mode & FMODE_READ) in xillyusb_open() 1293 if (filp->f_mode & FMODE_WRITE) in xillyusb_open() 1298 if (filp->f_mode & FMODE_WRITE) { in xillyusb_open() 1338 if (filp->f_mode & FMODE_READ) { in xillyusb_open() [all …]
|
/linux-6.12.1/security/apparmor/include/ |
D | file.h | 112 if (file->f_mode & FMODE_WRITE) in aa_map_file_to_perms() 114 if (file->f_mode & FMODE_READ) in aa_map_file_to_perms()
|
/linux-6.12.1/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.12.1/kernel/time/ |
D | posix-clock.c | 133 err = clk->ops.open(pccontext, fp->f_mode); in posix_clock_open() 254 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_adjtime() 319 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_settime()
|
/linux-6.12.1/fs/xfs/ |
D | xfs_exchrange.c | 767 if (!(fxr->file1->f_mode & FMODE_READ) || in xfs_exchange_range() 768 !(fxr->file1->f_mode & FMODE_WRITE) || in xfs_exchange_range() 769 !(fxr->file2->f_mode & FMODE_READ) || in xfs_exchange_range() 770 !(fxr->file2->f_mode & FMODE_WRITE)) in xfs_exchange_range() 789 if (!(fxr->file1->f_mode & FMODE_NOCMTIME) && !IS_NOCMTIME(inode1)) in xfs_exchange_range() 791 if (!(fxr->file2->f_mode & FMODE_NOCMTIME) && !IS_NOCMTIME(inode2)) in xfs_exchange_range()
|
/linux-6.12.1/include/linux/ |
D | anon_inodes.h | 22 void *priv, int flags, fmode_t f_mode);
|
/linux-6.12.1/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.12.1/fs/afs/ |
D | file.c | 152 if (file->f_mode & FMODE_WRITE) { in afs_open() 161 fscache_use_cookie(afs_vnode_cache(vnode), file->f_mode & FMODE_WRITE); in afs_open() 189 if ((file->f_mode & FMODE_WRITE)) in afs_release() 196 if ((file->f_mode & FMODE_WRITE)) { in afs_release()
|
/linux-6.12.1/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()
|