Home
last modified time | relevance | path

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

123

/fs/
Dfile_table.c56 if (!(f->f_mode & FMODE_NOACCOUNT)) in file_free()
117 f->f_mode = OPEN_FMODE(flags); in __alloc_file()
175 f->f_mode |= FMODE_NOACCOUNT; in alloc_empty_file_noaccount()
201 if ((file->f_mode & FMODE_READ) && in alloc_file()
203 file->f_mode |= FMODE_CAN_READ; in alloc_file()
204 if ((file->f_mode & FMODE_WRITE) && in alloc_file()
206 file->f_mode |= FMODE_CAN_WRITE; in alloc_file()
207 file->f_mode |= FMODE_OPENED; in alloc_file()
209 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) in alloc_file()
259 fmode_t mode = file->f_mode; in __fput()
[all …]
Dread_write.c39 return file->f_mode & FMODE_UNSIGNED_OFFSET; in unsigned_offsets()
296 if (file->f_mode & FMODE_LSEEK) { in vfs_llseek()
429 if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ))) in __kernel_read()
431 if (!(file->f_mode & FMODE_CAN_READ)) in __kernel_read()
469 if (!(file->f_mode & FMODE_READ)) in vfs_read()
471 if (!(file->f_mode & FMODE_CAN_READ)) in vfs_read()
525 if (WARN_ON_ONCE(!(file->f_mode & FMODE_WRITE))) in __kernel_write()
527 if (!(file->f_mode & FMODE_CAN_WRITE)) in __kernel_write()
578 if (!(file->f_mode & FMODE_WRITE)) in vfs_write()
580 if (!(file->f_mode & FMODE_CAN_WRITE)) in vfs_write()
[all …]
Dopen.c179 if (!S_ISREG(inode->i_mode) || !(f.file->f_mode & FMODE_WRITE)) in do_sys_ftruncate()
266 if (!(file->f_mode & FMODE_WRITE)) in vfs_fallocate()
785 f->f_mode = FMODE_PATH | FMODE_OPENED; in do_dentry_open()
790 if ((f->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) { in do_dentry_open()
792 } else if (f->f_mode & FMODE_WRITE && !special_file(inode->i_mode)) { in do_dentry_open()
801 f->f_mode |= FMODE_WRITER; in do_dentry_open()
806 f->f_mode |= FMODE_ATOMIC_POS; in do_dentry_open()
824 f->f_mode |= FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE; in do_dentry_open()
832 f->f_mode |= FMODE_OPENED; in do_dentry_open()
833 if ((f->f_mode & FMODE_READ) && in do_dentry_open()
[all …]
Dpipe.c661 if (filp->f_mode & FMODE_READ) in pipe_poll()
663 if (filp->f_mode & FMODE_WRITE) in pipe_poll()
675 if (filp->f_mode & FMODE_READ) { in pipe_poll()
682 if (filp->f_mode & FMODE_WRITE) { in pipe_poll()
717 if (file->f_mode & FMODE_READ) in pipe_release()
719 if (file->f_mode & FMODE_WRITE) in pipe_release()
742 if (filp->f_mode & FMODE_READ) in pipe_fasync()
744 if ((filp->f_mode & FMODE_WRITE) && retval >= 0) { in pipe_fasync()
746 if (retval < 0 && (filp->f_mode & FMODE_READ)) in pipe_fasync()
1128 switch (filp->f_mode & (FMODE_READ | FMODE_WRITE)) { in fifo_open()
Dsplice.c780 if (unlikely(!(in->f_mode & FMODE_READ))) in do_splice_to()
969 if (unlikely(!(out->f_mode & FMODE_WRITE))) in do_splice_direct()
1036 if (unlikely(!(in->f_mode & FMODE_READ) || in do_splice()
1037 !(out->f_mode & FMODE_WRITE))) in do_splice()
1061 if (!(out->f_mode & FMODE_PWRITE)) in do_splice()
1094 if (!(in->f_mode & FMODE_PREAD)) in do_splice()
1269 if (f.file->f_mode & FMODE_WRITE) { in vmsplice_type()
1271 } else if (f.file->f_mode & FMODE_READ) { in vmsplice_type()
1671 if (unlikely(!(in->f_mode & FMODE_READ) || in do_tee()
1672 !(out->f_mode & FMODE_WRITE))) in do_tee()
Dinternal.h103 if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_READ) { in put_file_access()
105 } else if (file->f_mode & FMODE_WRITER) { in put_file_access()
Dremap_range.c429 if (file->f_mode & FMODE_WRITE) in allow_file_dedupe()
504 if (!(file->f_mode & FMODE_READ)) in vfs_dedupe_file_range()
Dkernel_read_file.c181 if (!f.file || !(f.file->f_mode & FMODE_READ)) in kernel_read_file_from_fd()
Dfcntl.c465 if (unlikely(f.file->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3()
492 if (unlikely(f.file->f_mode & FMODE_PATH)) { in SYSCALL_DEFINE3()
629 if (unlikely(f.file->f_mode & FMODE_PATH)) { in do_compat_fcntl64()
Dfile.c890 if (unlikely(file->f_mode & mask)) in __fget_files_rcu()
1044 if (!file || unlikely(file->f_mode & mask)) in __fget_light()
1077 return (file->f_mode & FMODE_ATOMIC_POS) && in file_needs_f_pos_lock()
Dnamei.c3329 if (file->f_mode & FMODE_OPENED) { in atomic_open()
3383 file->f_mode &= ~FMODE_CREATED; in lookup_open()
3455 file->f_mode |= FMODE_CREATED; in lookup_open()
3533 if (!IS_ERR(dentry) && (file->f_mode & FMODE_CREATED)) in open_last_lookups()
3546 if (file->f_mode & (FMODE_OPENED | FMODE_CREATED)) { in open_last_lookups()
3573 if (!(file->f_mode & (FMODE_OPENED | FMODE_CREATED))) { in do_open()
3578 if (!(file->f_mode & FMODE_CREATED)) in do_open()
3582 if ((open_flag & O_EXCL) && !(file->f_mode & FMODE_CREATED)) in do_open()
3596 if (file->f_mode & FMODE_CREATED) { in do_open()
3607 if (!error && !(file->f_mode & FMODE_OPENED)) in do_open()
[all …]
/fs/proc/
Dfd.c116 *mode = file->f_mode; in tid_fd_mode()
122 fmode_t f_mode) in tid_fd_update_inode() argument
128 if (f_mode & FMODE_READ) in tid_fd_update_inode()
130 if (f_mode & FMODE_WRITE) in tid_fd_update_inode()
151 fmode_t f_mode; in tid_fd_revalidate() local
152 if (tid_fd_mode(task, fd, &f_mode)) { in tid_fd_revalidate()
153 tid_fd_update_inode(task, inode, f_mode); in tid_fd_revalidate()
264 data.mode = f->f_mode; in proc_readfd_common()
/fs/nfs/
Dnfs4file.c35 fmode_t f_mode; in nfs4_file_open() local
54 f_mode = filp->f_mode; in nfs4_file_open()
56 f_mode |= flags_to_mode(openflags); in nfs4_file_open()
64 ctx = alloc_nfs_open_context(file_dentry(filp), f_mode, filp); in nfs4_file_open()
121 if ((file->f_mode & FMODE_WRITE) == 0) in nfs4_file_flush()
368 filep->f_mode |= FMODE_READ; in __nfs42_ssc_open()
370 ctx = alloc_nfs_open_context(filep->f_path.dentry, filep->f_mode, in __nfs42_ssc_open()
389 update_open_stateid(ctx->state, stateid, NULL, filep->f_mode); in __nfs42_ssc_open()
/fs/ext4/
Ddir.c336 if ((filp->f_mode & FMODE_32BITHASH) || in hash2pos()
337 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in hash2pos()
345 if ((filp->f_mode & FMODE_32BITHASH) || in pos2maj_hash()
346 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2maj_hash()
354 if ((filp->f_mode & FMODE_32BITHASH) || in pos2min_hash()
355 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2min_hash()
366 if ((filp->f_mode & FMODE_32BITHASH) || in ext4_get_htree_eof()
367 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in ext4_get_htree_eof()
Dfile.c152 if ((filp->f_mode & FMODE_WRITE) && in ext4_release_file()
877 if (filp->f_mode & FMODE_WRITE) { in ext4_file_open()
883 filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC; in ext4_file_open()
Dioctl.c956 if (!(filp->f_mode & FMODE_READ) || in __ext4_ioctl()
957 !(filp->f_mode & FMODE_WRITE)) in __ext4_ioctl()
969 if (!(donor.file->f_mode & FMODE_WRITE)) { in __ext4_ioctl()
1051 if (!(filp->f_mode & FMODE_WRITE)) in __ext4_ioctl()
/fs/kernfs/
Dfile.c617 if ((file->f_mode & FMODE_WRITE) && in kernfs_fop_open()
621 if ((file->f_mode & FMODE_READ) && in kernfs_fop_open()
694 if (file->f_mode & FMODE_WRITE) in kernfs_fop_open()
695 file->f_mode |= FMODE_PWRITE; in kernfs_fop_open()
/fs/xfs/
Dxfs_ioctl.c253 filp->f_mode |= FMODE_NOCMTIME; in xfs_open_by_handle()
645 if (!(filp->f_mode & FMODE_WRITE)) in xfs_ioc_space()
656 if (filp->f_mode & FMODE_NOCMTIME) in xfs_ioc_space()
1745 if (!(f.file->f_mode & FMODE_WRITE) || in xfs_ioc_swapext()
1746 !(f.file->f_mode & FMODE_READ) || in xfs_ioc_swapext()
1758 if (!(tmp.file->f_mode & FMODE_WRITE) || in xfs_ioc_swapext()
1759 !(tmp.file->f_mode & FMODE_READ) || in xfs_ioc_swapext()
/fs/orangefs/
Dfile.c118 open_for_write = file->f_mode & FMODE_WRITE; in wait_for_direct_io()
119 open_for_read = file->f_mode & FMODE_READ; in wait_for_direct_io()
/fs/configfs/
Dfile.c340 if (file->f_mode & FMODE_WRITE) { in __configfs_open_file()
353 if (file->f_mode & FMODE_READ) { in __configfs_open_file()
/fs/jfs/
Dfile.c59 if (S_ISREG(inode->i_mode) && file->f_mode & FMODE_WRITE && in jfs_open()
/fs/ext2/
Dfile.c143 if (filp->f_mode & FMODE_WRITE) { in ext2_release_file()
/fs/autofs/
Dautofs_i.h211 if (!(pipe->f_mode & FMODE_CAN_WRITE)) in autofs_prepare_pipe()
/fs/afs/
Dfile.c146 if (file->f_mode & FMODE_WRITE) { in afs_open()
179 if ((file->f_mode & FMODE_WRITE)) in afs_release()
/fs/f2fs/
Dfile.c550 filp->f_mode |= FMODE_NOWAIT; in f2fs_file_open()
1851 if (!(filp->f_mode & FMODE_WRITE) || in f2fs_release_file()
2888 if (!(filp->f_mode & FMODE_READ) || in __f2fs_ioc_move_range()
2889 !(filp->f_mode & FMODE_WRITE)) in __f2fs_ioc_move_range()
2896 if (!(dst.file->f_mode & FMODE_WRITE)) { in __f2fs_ioc_move_range()
3472 if ((filp->f_mode & FMODE_WRITE && writecount != 1) || in f2fs_release_compress_blocks()
3473 (!(filp->f_mode & FMODE_WRITE) && writecount)) { in f2fs_release_compress_blocks()
3754 if (!(filp->f_mode & FMODE_WRITE)) in f2fs_sec_trim_file()
3940 if (!(filp->f_mode & FMODE_WRITE)) in f2fs_ioc_set_compress_option()
4029 if (!(filp->f_mode & FMODE_WRITE)) in f2fs_ioc_decompress_file()
[all …]

123