Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 4425) sorted by relevance

12345678910>>...177

/linux/fs/
H A Dfile_table.c48 struct file file; member
55 #define backing_file(f) container_of(f, struct backing_file, file)
57 const struct path *backing_file_user_path(const struct file *f) in backing_file_user_path()
63 void backing_file_set_user_path(struct file *f, const struct path *path) in backing_file_set_user_path()
69 static inline void file_free(struct file *f) in file_free()
154 static int init_file(struct file *f, int flags, const struct cred *cred) in init_file()
218 struct file *alloc_empty_file(int flags, const struct cred *cred) in alloc_empty_file()
221 struct file *f; in alloc_empty_file()
266 struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred) in alloc_empty_file_noaccount()
268 struct file *f; in alloc_empty_file_noaccount()
[all …]
H A Dread_write.c37 static inline bool unsigned_offsets(struct file *file) in unsigned_offsets() argument
39 return file->f_op->fop_flags & FOP_UNSIGNED_OFFSET; in unsigned_offsets()
55 static loff_t vfs_setpos_cookie(struct file *file, loff_t offset, in vfs_setpos_cookie() argument
58 if (offset < 0 && !unsigned_offsets(file)) in vfs_setpos_cookie()
63 if (offset != file->f_pos) { in vfs_setpos_cookie()
64 file->f_pos = offset; in vfs_setpos_cookie()
83 loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize) in vfs_setpos() argument
85 return vfs_setpos_cookie(file, offset, maxsize, NULL); in vfs_setpos()
102 static int must_set_pos(struct file *file, loff_t *offset, int whence, loff_t eof) in must_set_pos() argument
116 *offset = file->f_pos; in must_set_pos()
[all …]
H A Dinternal.h68 struct file *file, umode_t mode);
84 int mnt_get_write_access_file(struct file *file);
85 void mnt_put_write_access_file(struct file *file);
104 struct file *alloc_empty_file(int flags, const struct cred *cred);
105 struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred);
106 struct file *alloc_empty_backing_file(int flags, const struct cred *cred);
107 void backing_file_set_user_path(struct file *f, const struct path *path);
109 static inline void file_put_write_access(struct file *file) in file_put_write_access() argument
111 put_write_access(file->f_inode); in file_put_write_access()
112 mnt_put_write_access(file->f_path.mnt); in file_put_write_access()
[all …]
/linux/fs/lockd/
H A Dsvcsubs.c46 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
87 struct nlm_file *file, int mode) in nlm_do_fopen() argument
89 struct file **fp = &file->f_file[mode]; in nlm_do_fopen()
94 nfserr = nlmsvc_ops->fopen(rqstp, &file->f_handle, fp, mode); in nlm_do_fopen()
108 struct nlm_file *file; in nlm_lookup_file() local
121 hlist_for_each_entry(file, &nlm_files[hash], f_list) in nlm_lookup_file()
122 if (!nfs_compare_fh(&file->f_handle, &lock->fh)) { in nlm_lookup_file()
123 mutex_lock(&file->f_mutex); in nlm_lookup_file()
[all …]
/linux/fs/overlayfs/
H A Dfile.c27 static struct file *ovl_open_realfile(const struct file *file, in ovl_open_realfile() argument
31 struct inode *inode = file_inode(file); in ovl_open_realfile()
33 struct file *realfile; in ovl_open_realfile()
34 int flags = file->f_flags | OVL_OPEN_FLAGS; in ovl_open_realfile()
50 realfile = backing_file_open(file_user_path(file), in ovl_open_realfile()
56 file, file, ovl_whatisit(inode, realinode), file->f_flags, in ovl_open_realfile()
64 static int ovl_change_flags(struct file *file, unsigned int flags) in ovl_change_flags() argument
66 struct inode *inode = file_inode(file); in ovl_change_flags()
71 if (((flags ^ file->f_flags) & O_APPEND) && IS_APPEND(inode)) in ovl_change_flags()
74 if ((flags & O_DIRECT) && !(file->f_mode & FMODE_CAN_ODIRECT)) in ovl_change_flags()
[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/include/media/
H A Dvideobuf2-v4l2.h293 __poll_t vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait);
317 static inline bool vb2_queue_is_busy(struct vb2_queue *q, struct file *file) in vb2_queue_is_busy() argument
319 return q->owner && q->owner != file->private_data; in vb2_queue_is_busy()
324 int vb2_ioctl_reqbufs(struct file *file, void *priv,
326 int vb2_ioctl_create_bufs(struct file *file, void *priv,
328 int vb2_ioctl_prepare_buf(struct file *file, void *priv,
330 int vb2_ioctl_querybuf(struct file *file, void *priv, struct v4l2_buffer *p);
331 int vb2_ioctl_qbuf(struct file *file, void *priv, struct v4l2_buffer *p);
332 int vb2_ioctl_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p);
333 int vb2_ioctl_streamon(struct file *file, void *priv, enum v4l2_buf_type i);
[all …]
/linux/fs/ecryptfs/
H A Dfile.c36 struct file *file = iocb->ki_filp; in ecryptfs_read_update_atime() local
40 struct path path = ecryptfs_lower_path(file->f_path.dentry); in ecryptfs_read_update_atime()
56 static ssize_t ecryptfs_splice_read_update_atime(struct file *in, loff_t *ppos, in ecryptfs_splice_read_update_atime()
124 static int ecryptfs_readdir(struct file *file, struct dir_context *ctx) in ecryptfs_readdir() argument
127 struct file *lower_file; in ecryptfs_readdir()
128 struct inode *inode = file_inode(file); in ecryptfs_readdir()
134 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_readdir()
186 static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma) in ecryptfs_mmap() argument
188 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_mmap()
196 return generic_file_mmap(file, vma); in ecryptfs_mmap()
[all …]
/linux/include/linux/
H A Dfs.h292 struct file *ia_file;
382 struct file *ki_filp;
404 int (*read_folio)(struct file *, struct folio *);
440 int (*swap_activate)(struct swap_info_struct *sis, struct file *file,
442 void (*swap_deactivate)(struct file *file);
1188 struct file *file; /* backpointer for security modules */ member
1258 struct file { struct
1308 static inline struct file *get_file(struct file *f) in get_file()
1314 struct file *get_file_rcu(struct file __rcu **f);
1315 struct file *get_file_active(struct file **f);
[all …]
/linux/drivers/infiniband/core/
H A Duser_mad.c174 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()
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()
200 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet()
201 list_add_tail(&packet->list, &file->recv_list); in queue_packet()
202 atomic_inc(&file->recv_list_size); in queue_packet()
[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 static 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/kernel/trace/
H A Dtrace_events_trigger.c121 event_triggers_call(struct trace_event_file *file, in event_triggers_call() argument
129 if (list_empty(&file->triggers)) in event_triggers_call()
132 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call()
152 bool __trace_trigger_soft_disabled(struct trace_event_file *file) in __trace_trigger_soft_disabled() argument
154 unsigned long eflags = file->flags; in __trace_trigger_soft_disabled()
157 event_triggers_call(file, NULL, NULL, NULL); in __trace_trigger_soft_disabled()
161 return trace_event_ignore_this_pid(file); in __trace_trigger_soft_disabled()
179 event_triggers_post_call(struct trace_event_file *file, in event_triggers_post_call() argument
184 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call()
206 static bool check_user_trigger(struct trace_event_file *file) in check_user_trigger() argument
[all …]
/linux/fs/proc/
H A Dinode.c235 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
308 return read(file, buf, count, ppos); in pde_read()
312 static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in proc_reg_read() argument
[all …]
/linux/fs/ceph/
H A Dioctl.c18 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()
79 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_set_layout()
137 static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) in ceph_ioctl_set_layout_policy() argument
139 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout_policy()
180 static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) in ceph_ioctl_get_dataloc() argument
[all …]
/linux/drivers/net/wireless/mediatek/mt76/
H A Dmt76x02_debugfs.c10 mt76x02_ampdu_stat_show(struct seq_file *file, void *data) in mt76x02_ampdu_stat_show() argument
12 struct mt76x02_dev *dev = file->private; in mt76x02_ampdu_stat_show()
16 seq_puts(file, "Length: "); in mt76x02_ampdu_stat_show()
18 seq_printf(file, "%8d | ", i * 8 + j + 1); in mt76x02_ampdu_stat_show()
19 seq_puts(file, "\n"); in mt76x02_ampdu_stat_show()
20 seq_puts(file, "Count: "); in mt76x02_ampdu_stat_show()
22 seq_printf(file, "%8d | ", in mt76x02_ampdu_stat_show()
24 seq_puts(file, "\n"); in mt76x02_ampdu_stat_show()
25 seq_puts(file, "--------"); in mt76x02_ampdu_stat_show()
27 seq_puts(file, " in mt76x02_ampdu_stat_show()
36 read_txpower(struct seq_file * file,void * data) read_txpower() argument
48 mt76x02_dfs_stat_show(struct seq_file * file,void * data) mt76x02_dfs_stat_show() argument
75 read_agc(struct seq_file * file,void * data) read_agc() argument
[all...]
/linux/drivers/gpu/drm/
H A Ddrm_file.c136 struct drm_file *file; in drm_file_alloc() local
139 file = kzalloc(sizeof(*file), GFP_KERNEL); in drm_file_alloc()
140 if (!file) in drm_file_alloc()
144 file->client_id = atomic64_inc_return(&ident); in drm_file_alloc()
145 rcu_assign_pointer(file->pid, get_pid(task_tgid(current))); in drm_file_alloc()
146 file->minor = minor; in drm_file_alloc()
149 file->authenticated = capable(CAP_SYS_ADMIN); in drm_file_alloc()
151 INIT_LIST_HEAD(&file->lhead); in drm_file_alloc()
152 INIT_LIST_HEAD(&file->fbs); in drm_file_alloc()
153 mutex_init(&file->fbs_lock); in drm_file_alloc()
[all …]
/linux/fs/ocfs2/
H A Dlocks.c23 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
85 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_funlock()
88 ocfs2_file_unlock(file); in ocfs2_do_funlock()
[all …]
/linux/tools/perf/util/
H A Ddata.c51 struct perf_data_file *file = &files[i]; in perf_data__create_dir() local
53 ret = asprintf(&file->path, "%s/data.%d", data->path, i); in perf_data__create_dir()
60 ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); in perf_data__create_dir()
75 file->fd = ret; in perf_data__create_dir()
97 * Directory containing a single regular perf data file which is already in perf_data__open_dir()
115 struct perf_data_file *file; in perf_data__open_dir() local
128 file = realloc(files, (nr + 1) * sizeof(*files)); in perf_data__open_dir()
129 if (!file) in perf_data__open_dir()
132 files = file; in perf_data__open_dir()
133 file in perf_data__open_dir()
169 struct perf_data_file *file = &data->dir.files[i]; perf_data__update_dir() local
414 perf_data_file__write(struct perf_data_file * file,void * buf,size_t size) perf_data_file__write() argument
478 struct perf_data_file *file = &data->dir.files[i]; perf_data__size() local
560 FILE *file; is_perf_data() local
[all...]
/linux/scripts/
H A Dleaking_addresses.pl268 my $file = '/boot/config-' . `uname -r`;
269 chomp $file;
270 @config_files = ($file, '/boot/config');
273 foreach my $file (@config_files) {
274 dprint("parsing config file: $file\n");
275 $value = option_from_file($option, $file);
287 my ($option, $file) = @_;
291 open(my $fh, "<", $file) or return "";
460 my ($file) = @_;
465 parse_file($file);
[all …]
/linux/mm/
H A Dmemfd.c68 struct folio *memfd_alloc_folio(struct file *memfd, pgoff_t idx) in memfd_alloc_folio()
211 static unsigned int *memfd_file_seals_ptr(struct file *file) in memfd_file_seals_ptr() argument
213 if (shmem_file(file)) in memfd_file_seals_ptr()
214 return &SHMEM_I(file_inode(file))->seals; in memfd_file_seals_ptr()
217 if (is_file_hugepages(file)) in memfd_file_seals_ptr()
218 return &HUGETLBFS_I(file_inode(file))->seals; in memfd_file_seals_ptr()
231 static int memfd_add_seals(struct file *file, unsigned int seals) in memfd_add_seals() argument
233 struct inode *inode = file_inode(file); in memfd_add_seals()
269 if (!(file->f_mode & FMODE_WRITE)) in memfd_add_seals()
276 file_seals = memfd_file_seals_ptr(file); in memfd_add_seals()
[all …]
H A Dfadvise.c31 int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice) in generic_fadvise() argument
41 inode = file_inode(file); in generic_fadvise()
45 mapping = file->f_mapping; in generic_fadvise()
80 file->f_ra.ra_pages = bdi->ra_pages; in generic_fadvise()
81 spin_lock(&file->f_lock); in generic_fadvise()
82 file->f_mode &= ~(FMODE_RANDOM | FMODE_NOREUSE); in generic_fadvise()
83 spin_unlock(&file->f_lock); in generic_fadvise()
86 spin_lock(&file->f_lock); in generic_fadvise()
87 file->f_mode |= FMODE_RANDOM; in generic_fadvise()
88 spin_unlock(&file->f_lock); in generic_fadvise()
[all …]
/linux/drivers/media/pci/ivtv/
H A Divtv-ioctl.c309 static int ivtv_g_fmt_sliced_vbi_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_sliced_vbi_out() argument
311 struct ivtv *itv = file2id(file)->itv; in ivtv_g_fmt_sliced_vbi_out()
331 static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_cap() argument
333 struct ivtv_open_id *id = file2id(file); in ivtv_g_fmt_vid_cap()
354 static int ivtv_g_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vbi_cap() argument
356 struct ivtv *itv = file2id(file)->itv; in ivtv_g_fmt_vbi_cap()
372 static int ivtv_g_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_sliced_vbi_cap() argument
375 struct ivtv_open_id *id = file2id(file); in ivtv_g_fmt_sliced_vbi_cap()
395 static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_out() argument
397 struct ivtv_open_id *id = file2id(file); in ivtv_g_fmt_vid_out()
[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/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()
55 static ssize_t lbs_sleepparams_write(struct file *file, in lbs_sleepparams_write() argument
59 struct lbs_private *priv = file->private_data; in lbs_sleepparams_write()
92 static ssize_t lbs_sleepparams_read(struct file *file, char __user *userbuf, in lbs_sleepparams_read() argument
95 struct lbs_private *priv = file->private_data; in lbs_sleepparams_read()
120 static ssize_t lbs_host_sleep_write(struct file *file, in lbs_host_sleep_write() argument
124 struct lbs_private *priv = file->private_data; in lbs_host_sleep_write()
162 static ssize_t lbs_host_sleep_read(struct file *file, char __user *userbuf, in lbs_host_sleep_read() argument
[all …]
/linux/tools/testing/ktest/examples/bootconfigs/
H A Dverify-functiongraph.sh6 file="$1"
8 content=`cat $file`
10 echo "FAILED: $file has '$content', expected '$val'"
16 file="$1"
18 content=`cat $file | sed -ne "/^$val/p"`
20 echo "FAILED: $file does not contain '$val'"
21 cat $file
27 file=$1
30 if ! grep -q "$val" $file ; then
31 echo "FAILED: $file does not contain $val"
[all …]

12345678910>>...177