Home
last modified time | relevance | path

Searched full:file (Results 1 – 25 of 7632) sorted by relevance

12345678910>>...306

/linux/fs/overlayfs/
H A Dfile.c7 #include <linux/file.h>
15 #include <linux/backing-file.h>
28 static struct file *ovl_open_realfile(const struct file *file, in ovl_open_realfile() argument
32 struct inode *inode = file_inode(file); in ovl_open_realfile()
34 struct file *realfile; in ovl_open_realfile()
35 int flags = file->f_flags | OVL_OPEN_FLAGS; in ovl_open_realfile()
51 realfile = backing_file_open(file, in ovl_open_realfile()
57 file, file, ovl_whatisit(inode, realinode), file->f_flags, in ovl_open_realfile()
65 static int ovl_change_flags(struct file *file, unsigned int flags) in ovl_change_flags() argument
67 struct inode *inode = file_inode(file); in ovl_change_flags()
[all …]
/linux/rust/kernel/fs/
H A Dfile.rs5 //! Files and file descriptors.
8 //! [`include/linux/file.h`](srctree/include/linux/file.h)
20 /// Primitive type representing the offset within a [`File`].
25 /// Flags associated with a [`File`].
27 /// File is opened in append mode.
36 /// File was created if it didn't already exist.
39 /// Direct I/O is enabled for this file.
42 /// File must be a directory.
48 /// Ensure that this file is created with the `open(2)` call.
51 /// Large file size enabled (`off64_t` over `off_t`).
[all …]
/linux/fs/lockd/
H A Dsvcsubs.c28 * Global file hash table
46 static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) in nlm_debug_print_file() argument
48 struct inode *inode = nlmsvc_file_inode(file); in nlm_debug_print_file()
59 static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) in nlm_debug_print_file() argument
80 * Open the file. Note that if we're reexporting, for example,
84 * the file.
91 struct nlm_file *file, int mode) in nlm_do_fopen() argument
108 struct file **fp = &file->f_file[m]; in nlm_do_fopen()
117 error = ops->fopen(rqstp, &file->f_handle, fp, m); in nlm_do_fopen()
143 * Lookup file info. If it doesn't exist, create a file info struct
[all …]
/linux/drivers/scsi/fnic/
H A Dfnic_debugfs.c14 struct file *file);
15 static ssize_t fnic_nvmef_debugfs_read(struct file *file,
19 struct file *file);
47 * file system. If not already created, this routine will create the
80 * When Debugfs is configured this routine removes debugfs file system
100 * or fc_trace_clear debugfs file
101 * @filp: The file pointer to read from.
104 * @ppos: The position in the file to start reading from.
110 * It will start reading file at @ppos and
116 static ssize_t fnic_trace_ctrl_read(struct file *filp, in fnic_trace_ctrl_read()
[all …]
/linux/tools/testing/selftests/rcutorture/bin/
H A Dparse-console.sh5 # The "file" is a pathname on the local system, and "title" is
8 # Usage: parse-console.sh file title
15 file="$1"
22 # Check for presence and readability of console output file
23 if test -f "$file" -a -r "$file"
27 echo $title unreadable console output file: $file
30 if grep -Pq '\x00' < $file
34 cat /dev/null > $file
[all...]
/linux/drivers/infiniband/core/
H A Duser_mad.c9 * General Public License (GPL) Version 2, available from the file
81 * device special file is opened, we take a reference on the
174 static int hdr_size(struct ib_umad_file *file) in hdr_size() argument
176 return file->use_pkey_index ? sizeof(struct ib_user_mad_hdr) : in hdr_size()
180 /* caller must hold file->mutex */
181 static struct ib_mad_agent *__get_agent(struct ib_umad_file *file, int id) in __get_agent() argument
183 return file->agents_dead ? NULL : file->agent[id]; in __get_agent()
186 static int queue_packet(struct ib_umad_file *file, struct ib_mad_agent *agent, in queue_packet() argument
191 mutex_lock(&file->mutex); in queue_packet()
194 atomic_read(&file->recv_list_size) > MAX_UMAD_RECV_LIST_SIZE) in queue_packet()
[all …]
/linux/drivers/gpu/drm/i915/gt/
H A Dshmem_utils.c17 struct file *shmem_create_from_data(const char *name, void *data, size_t len) in shmem_create_from_data()
19 struct file *file; in shmem_create_from_data() local
22 file = shmem_file_setup(name, PAGE_ALIGN(len), in shmem_create_from_data()
24 if (IS_ERR(file)) in shmem_create_from_data()
25 return file; in shmem_create_from_data()
27 err = shmem_write(file, 0, data, len); in shmem_create_from_data()
29 fput(file); in shmem_create_from_data()
33 return file; in shmem_create_from_data()
36 struct file *shmem_create_from_object(struct drm_i915_gem_object *obj) in shmem_create_from_object()
39 struct file *file; in shmem_create_from_object() local
[all …]
/linux/fs/ceph/
H A Dioctl.c16 * get and set the file layout
18 static long ceph_ioctl_get_layout(struct file *file, void __user *arg) in ceph_ioctl_get_layout() argument
20 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_get_layout()
24 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_get_layout()
65 static long ceph_ioctl_set_layout(struct file *file, void __user *arg) in ceph_ioctl_set_layout() argument
67 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout()
71 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_set_layout()
75 if (!inode_owner_or_capable(file_mnt_idmap(file), inode)) in ceph_ioctl_set_layout()
82 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_set_layout()
140 static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) in ceph_ioctl_set_layout_policy() argument
[all …]
/linux/fs/proc/
H A Dinode.c19 #include <linux/file.h>
226 * "struct file" needs to be available at the right moment. in close_pdeo()
235 struct file *file; in close_pdeo() local
241 file = pdeo->file; in close_pdeo()
242 pde->proc_ops->proc_release(file_inode(file), file); in close_pdeo()
275 static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) in proc_reg_llseek() argument
277 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_llseek()
281 return pde->proc_ops->proc_lseek(file, offset, whence); in proc_reg_llseek()
283 rv = pde->proc_ops->proc_lseek(file, offset, whence); in proc_reg_llseek()
304 static ssize_t pde_read(struct proc_dir_entry *pde, struct file *file, char __user *buf, size_t cou… in pde_read() argument
[all …]
/linux/drivers/gpu/drm/
H A Ddrm_file.c37 #include <linux/file.h>
72 * DOC: file operations
74 * Drivers must define the file operations structure that forms the DRM
87 * userspace through the file descriptor. They are used to send vblank event and
97 * No other file operations are supported by the DRM userspace API. Overall the
122 * drm_file_alloc - allocate file context
125 * This allocates a new DRM file context. It is not linked into any context and
136 struct drm_file *file; in drm_file_alloc() local
139 file = kzalloc_obj(*file); in drm_file_alloc()
140 if (!file) in drm_file_alloc()
[all …]
/linux/security/integrity/ima/
H A Dima_main.c13 * File: ima_main.c
19 #include <linux/file.h>
105 /* Prevent mmap'ing a file execute that is already mmap'ed write */
106 static int mmap_violation_check(enum ima_hooks func, struct file *file, in mmap_violation_check() argument
114 mapping_writably_mapped(file->f_mapping)) { in mmap_violation_check()
116 inode = file_inode(file); in mmap_violation_check()
119 *pathname = ima_d_path(&file->f_path, pathbuf, in mmap_violation_check()
131 * - Opening a file for write when already open for read,
133 * - Opening a file for read when already open for write,
134 * could result in a file measurement error.
[all …]
/linux/drivers/net/wireless/marvell/libertas/
H A Ddebugfs.c25 static ssize_t write_file_dummy(struct file *file, const char __user *buf, in write_file_dummy() argument
33 static ssize_t lbs_dev_info(struct file *file, char __user *userbuf, in lbs_dev_info() argument
36 struct lbs_private *priv = file->private_data; in lbs_dev_info()
54 static ssize_t lbs_sleepparams_write(struct file *file, in lbs_sleepparams_write() argument
58 struct lbs_private *priv = file->private_data; in lbs_sleepparams_write()
91 static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf, in lbs_sleepparams_read() argument
94 struct lbs_private *priv = file->private_data; in lbs_sleepparams_read()
118 static ssize_t lbs_host_sleep_write(struct file *file, in lbs_host_sleep_write() argument
122 struct lbs_private *priv = file->private_data; in lbs_host_sleep_write()
160 static ssize_t lbs_host_sleep_read(struct file *file, char __user *userbuf, in lbs_host_sleep_read() argument
[all …]
/linux/tools/perf/util/
H A Ddata.c23 static void perf_data_file__close(struct perf_data_file *file) in close_dir()
25 if (file->use_stdio) { in close_dir()
26 if (file->fptr) { in close_dir()
27 fclose(file->fptr); in close_dir()
28 file->fptr = NULL; in close_dir()
31 close(file->fd);
32 file->fd = -1; in perf_data__close_dir()
34 zfree(&file->path); in perf_data__close_dir()
66 struct perf_data_file *file = &files[i]; in perf_data__create_dir()
68 ret = asprintf(&file in perf_data__create_dir()
51 struct perf_data_file *file = &files[i]; perf_data__create_dir() local
115 struct perf_data_file *file; perf_data__open_dir() local
385 perf_data_file__write(struct perf_data_file * file,void * buf,size_t size) perf_data_file__write() argument
449 struct perf_data_file *file = &data->dir.files[i]; perf_data__size() local
531 FILE *file; is_perf_data() local
[all...]
/linux/fs/ocfs2/
H A Dlocks.c5 * Userspace file locking support
19 #include "file.h"
23 static int ocfs2_do_flock(struct file *file, struct inode *inode, in ocfs2_do_flock() argument
27 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_flock()
58 locks_lock_file_wait(file, &request); in ocfs2_do_flock()
60 ocfs2_file_unlock(file); in ocfs2_do_flock()
63 ret = ocfs2_file_lock(file, level, trylock); in ocfs2_do_flock()
72 ret = locks_lock_file_wait(file, fl); in ocfs2_do_flock()
74 ocfs2_file_unlock(file); in ocfs2_do_flock()
82 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument
[all …]
/linux/include/linux/
H A Dfile.h16 struct file;
18 extern void fput(struct file *);
26 extern struct file *alloc_file_pseudo(struct inode *, struct vfsmount *,
28 extern struct file *alloc_file_pseudo_noaccount(struct inode *, struct vfsmount *,
30 extern struct file *alloc_file_clone(struct file *, int flags,
33 /* either a reference to struct file + flags
44 #define fd_file(f) ((struct file *)((f).word & ~(FDPUT_FPUT|FDPUT_POS_UNLOCK)))
51 static inline struct fd BORROWED_FD(struct file *f) in BORROWED_FD()
55 static inline struct fd CLONED_FD(struct file *f) in CLONED_FD()
66 extern struct file *fget(unsigned int fd);
[all …]
H A Dfs.h103 * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
107 /* file is open for reading */
109 /* file is open for writing */
111 /* file is seekable */
113 /* file can be accessed using pread */
115 /* file can be accessed using pwrite */
117 /* File is opened for execution with sys_execve / sys_uselib */
119 /* File writes are restricted (block device specific) */
121 /* File supports atomic writes */
145 /* File i
1185 struct file *file; /* backpointer for security modules */ global() member
1255 struct file { global() struct
1258 f_opfile global() argument
1272 __anon6bf1e237090afile global() argument
1290 f_posfile global() argument
1293 f_reffile global() argument
1301 __anon6bf1e2370a0afile global() argument
1339 file_f_owner(const struct file * file) file_f_owner() argument
1359 file_dentry(const struct file * file) file_dentry() argument
1736 file_write_started(const struct file * file) file_write_started() argument
1751 file_write_not_started(const struct file * file) file_write_not_started() argument
2040 can_mmap_file(struct file * file) can_mmap_file() argument
2059 vfs_mmap(struct file * file,struct vm_area_struct * vma) vfs_mmap() argument
2067 vfs_mmap_prepare(struct file * file,struct vm_area_desc * desc) vfs_mmap_prepare() argument
2274 file_accessed(struct file * file) file_accessed() argument
2462 file_mnt_idmap(const struct file * file) file_mnt_idmap() argument
2467 file_owner_or_capable(const struct file * file) file_owner_or_capable() argument
2547 file_clone_open(struct file * file) file_clone_open() argument
2596 finish_open_simple(struct file * file,int error) finish_open_simple() argument
2660 file_write_and_wait(struct file * file) file_write_and_wait() argument
2714 file_permission(struct file * file,int mask) file_permission() argument
2749 file_start_write(struct file * file) file_start_write() argument
2756 file_start_write_trylock(struct file * file) file_start_write_trylock() argument
2769 file_end_write(struct file * file) file_end_write() argument
2837 deny_write_access(struct file * file) deny_write_access() argument
2846 allow_write_access(struct file * file) allow_write_access() argument
2873 file_set_fsnotify_mode(struct file * file,fmode_t mode) file_set_fsnotify_mode() argument
3409 file_is_dax(const struct file * file) file_is_dax() argument
3433 iocb_flags(struct file * file) iocb_flags() argument
3609 dir_emit_dot(struct file * file,struct dir_context * ctx) dir_emit_dot() argument
3614 dir_emit_dotdot(struct file * file,struct dir_context * ctx) dir_emit_dotdot() argument
3619 dir_emit_dots(struct file * file,struct dir_context * ctx) dir_emit_dots() argument
[all...]
/linux/tools/objtool/
H A Dcheck.c41 struct instruction *find_insn(struct objtool_file *file, in find_insn() argument
46 hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) { in find_insn()
54 struct instruction *next_insn_same_sec(struct objtool_file *file, in next_insn_same_sec() argument
58 return find_insn(file, insn->sec, insn->offset + insn->len); in next_insn_same_sec()
67 struct instruction *next_insn_same_func(struct objtool_file *file, in next_insn_same_func() argument
70 struct instruction *next = next_insn_same_sec(file, insn); in next_insn_same_func()
84 return find_insn(file, func->cfunc->sec, func->cfunc->offset); in next_insn_same_func()
87 static struct instruction *prev_insn_same_sec(struct objtool_file *file, in prev_insn_same_sec() argument
92 return find_insn(file, insn->sec, insn->offset - insn->prev_len); in prev_insn_same_sec()
99 static struct instruction *prev_insn_same_sym(struct objtool_file *file, in prev_insn_same_sym() argument
[all …]
/linux/tools/power/acpi/tools/acpidump/
H A Dapfiles.c4 * Module Name: apfiles - File-related functions for acpidump utility
24 * DESCRIPTION: Query for file overwrite if it already exists.
58 * RETURN: Open file handle
60 * DESCRIPTION: Open a text output file for acpidump. Checks if file already
67 ACPI_FILE file; in ap_open_output_file() local
69 /* If file exists, prompt for overwrite */ in ap_open_output_file()
75 /* Point stdout to the file */ in ap_open_output_file()
77 file = fopen(pathname, "w"); in ap_open_output_file()
78 if (!file) { in ap_open_output_file()
108 ACPI_FILE file; ap_write_to_binary_file() local
183 ACPI_FILE file; ap_get_table_from_file() local
[all...]
/linux/fs/nfs/
H A Dfile.c3 * linux/fs/nfs/file.c
13 * Expire cache on write to a file by Wai S Kok (Oct 1994).
17 * nfs regular file handling functions
59 * Open file
62 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open()
66 dprintk("NFS: open file(%pD2)\n", filp); in nfs_file_open()
84 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release()
96 * nfs_revalidate_file_size - Revalidate the file size
98 * @filp: pointer to struct file
100 * Revalidates the file length. This is basically a wrapper around
[all …]
/linux/security/tomoyo/
H A Dsecurityfs_if.c31 * @file: Pointer to "struct file".
41 static ssize_t tomoyo_write_self(struct file *file, const char __user *buf, in tomoyo_write_self() argument
93 * @file: Pointer to "struct file".
100 static ssize_t tomoyo_read_self(struct file *file, char __user *buf, in tomoyo_read_self() argument
128 * @file: Pointer to "struct file".
132 static int tomoyo_open(struct inode *inode, struct file *file) in tomoyo_open() argument
134 const u8 key = (uintptr_t) file_inode(file)->i_private; in tomoyo_open()
136 return tomoyo_open_control(key, file); in tomoyo_open()
143 * @file: Pointer to "struct file".
146 static int tomoyo_release(struct inode *inode, struct file *file) in tomoyo_release() argument
[all …]
/linux/fs/gfs2/
H A Dfile.c47 * gfs2_llseek - seek to a location in a file
48 * @file: the file
52 * SEEK_END requires the glock for the file because it references the
53 * file's size.
58 static loff_t gfs2_llseek(struct file *file, loff_t offset, int whence) in gfs2_llseek() argument
60 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_llseek()
69 error = generic_file_llseek(file, offset, whence); in gfs2_llseek()
75 error = gfs2_seek_data(file, offset); in gfs2_llseek()
79 error = gfs2_seek_hole(file, offset); in gfs2_llseek()
88 error = generic_file_llseek(file, offset, whence); in gfs2_llseek()
[all …]
/linux/Documentation/filesystems/
H A Dzonefs.rst10 zonefs is a very simple file system exposing each zone of a zoned block device
11 as a file. Unlike a regular POSIX-compliant file system with native zoned block
15 of the file (append only writes).
18 than to a full-featured POSIX file system. The goal of zonefs is to simplify
20 raw block device file accesses with a richer file API, avoiding relying on
21 direct block device file ioctls which may be more obscure to developers. One
24 by allowing SSTables to be stored in a zone file similarly to a regular file
26 of the higher level construct "one file is one zone" can help reducing the
62 by sub-directories. This file structure is built entirely using zone information
72 and populates the mount point with a static file tree solely based on this
[all …]
/linux/drivers/media/pci/cx18/
H A Dcx18-ioctl.c52 static int cx18_g_fmt_vid_cap(struct file *file, void *fh, in cx18_g_fmt_vid_cap() argument
55 struct cx18_open_id *id = file2id(file); in cx18_g_fmt_vid_cap()
76 static int cx18_try_fmt_vid_cap(struct file *file, void *fh, in cx18_try_fmt_vid_cap() argument
79 struct cx18_open_id *id = file2id(file); in cx18_try_fmt_vid_cap()
121 static int cx18_s_fmt_vid_cap(struct file *file, void *fh, in cx18_s_fmt_vid_cap() argument
124 struct cx18_open_id *id = file2id(file); in cx18_s_fmt_vid_cap()
133 ret = cx18_try_fmt_vid_cap(file, fh, fmt); in cx18_s_fmt_vid_cap()
154 return cx18_g_fmt_vid_cap(file, fh, fmt); in cx18_s_fmt_vid_cap()
261 static int cx18_g_fmt_vbi_cap(struct file *file, void *fh, in cx18_g_fmt_vbi_cap() argument
264 struct cx18 *cx = file2id(file)->cx; in cx18_g_fmt_vbi_cap()
[all …]
/linux/arch/powerpc/platforms/cell/spufs/
H A Dfile.c3 * SPU file system -- file contents
44 static int spufs_attr_open(struct inode *inode, struct file *file, in spufs_attr_open() argument
59 file->private_data = attr; in spufs_attr_open()
61 return nonseekable_open(inode, file); in spufs_attr_open()
64 static int spufs_attr_release(struct inode *inode, struct file *file) in spufs_attr_release() argument
66 kfree(file->private_data); in spufs_attr_release()
70 static ssize_t spufs_attr_read(struct file *file, char __user *buf, in spufs_attr_read() argument
77 attr = file->private_data; in spufs_attr_read()
103 static ssize_t spufs_attr_write(struct file *file, const char __user *buf, in spufs_attr_write() argument
111 attr = file->private_data; in spufs_attr_write()
[all …]
/linux/fs/nls/
H A DKconfig25 The default NLS used when mounting file system. Note, that this is
26 the NLS used by your console, not the NLS used by a specific file
43 The Microsoft FAT file system family can deal with filenames in
48 only, not to the file contents. You can include several codepages;
55 The Microsoft FAT file system family can deal with filenames in
60 only, not to the file contents. You can include several codepages;
67 The Microsoft FAT file system family can deal with filenames in
72 only, not to the file contents. You can include several codepages;
80 The Microsoft FAT file system family can deal with filenames in
85 only, not to the file contents. You can include several codepages;
[all …]

12345678910>>...306