Home
last modified time | relevance | path

Searched refs:f_mode (Results 1 – 25 of 187) sorted by relevance

12345678

/linux-6.12.1/fs/
Dfile_table.c66 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 …]
Dread_write.c212 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 …]
Dopen.c168 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 …]
Dbacking-file.c169 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()
Danon_inodes.c171 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()
Dpipe.c672 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 …]
Dsplice.c50 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 …]
Dinternal.h108 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/
Dtest_subprogs_extable.c25 *(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/
Dfd.c123 *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/
Ddmasound_core.c679 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/
Dfadvise.c82 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/
Dtrace_recursion_record.c187 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/
Ddir.c344 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/
Dhostaudio_kern.c191 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/
Dxillybus_core.c1179 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 …]
Dxillyusb.c1266 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/
Dfile.h112 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/
Dopenprom.c582 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/
Dposix-clock.c133 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/
Dxfs_exchrange.c767 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/
Danon_inodes.h22 void *priv, int flags, fmode_t f_mode);
/linux-6.12.1/drivers/char/
Dnvram.c364 (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/
Dfile.c152 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/
Dvfs_dir.c218 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()

12345678