| /linux/fs/overlayfs/ |
| H A D | file.c | 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() 72 if (((flags ^ file->f_flags) & O_APPEND) && IS_APPEND(inode)) in ovl_change_flags() 75 if ((flags & O_DIRECT) && !(file->f_mode & FMODE_CAN_ODIRECT)) in ovl_change_flags() [all …]
|
| /linux/fs/lockd/ |
| H A D | svcsubs.c | 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 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() 150 struct nlm_file *file; in nlm_lookup_file() local 161 hlist_for_each_entry(file, &nlm_files[hash], f_list) in nlm_lookup_file() 162 if (!nfs_compare_fh(&file->f_handle, &lock->fh)) { in nlm_lookup_file() 163 mutex_lock(&file->f_mutex); in nlm_lookup_file() [all …]
|
| /linux/tools/testing/selftests/rcutorture/bin/ |
| H A D | parse-console.sh | 5 # 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/gpu/drm/i915/gt/ |
| H A D | shmem_utils.c | 17 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/drivers/infiniband/core/ |
| H A D | user_mad.c | 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() 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 D | check.c | 41 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/fs/ceph/ |
| H A D | ioctl.c | 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 142 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout_policy() [all …]
|
| /linux/fs/ocfs2/ |
| H A D | locks.c | 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 85 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_funlock() 88 ocfs2_file_unlock(file); in ocfs2_do_funlock() [all …]
|
| /linux/fs/proc/ |
| H A D | inode.c | 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 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/kernel/trace/ |
| H A D | trace_events_trigger.c | 184 event_triggers_call(struct trace_event_file *file, in event_triggers_call() argument 192 if (list_empty(&file->triggers)) in event_triggers_call() 195 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_call() 215 bool __trace_trigger_soft_disabled(struct trace_event_file *file) in __trace_trigger_soft_disabled() argument 217 unsigned long eflags = file->flags; in __trace_trigger_soft_disabled() 220 event_triggers_call(file, NULL, NULL, NULL); in __trace_trigger_soft_disabled() 224 return trace_event_ignore_this_pid(file); in __trace_trigger_soft_disabled() 242 event_triggers_post_call(struct trace_event_file *file, in event_triggers_post_call() argument 247 list_for_each_entry_rcu(data, &file->triggers, list) { in event_triggers_post_call() 269 static bool check_user_trigger(struct trace_event_file *file) in check_user_trigger() argument [all …]
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_file.c | 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() 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/tools/perf/util/ |
| H A D | data.c | 23 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/scripts/ |
| H A D | leaking_addresses.pl | 268 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 D | memfd.c | 3 * memfd_create system call and file sealing support 12 #include <linux/file.h> 68 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() 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 int memfd_add_seals(struct file *fil in memfd_add_seals() 210 memfd_file_seals_ptr(struct file * file) memfd_file_seals_ptr() argument 230 memfd_add_seals(struct file * file,unsigned int seals) memfd_add_seals() argument 312 memfd_get_seals(struct file * file) memfd_get_seals() argument 319 memfd_fcntl(struct file * file,unsigned int cmd,unsigned int arg) memfd_fcntl() argument 397 memfd_check_seals_mmap(struct file * file,vm_flags_t * vm_flags_ptr) memfd_check_seals_mmap() argument 461 struct file *file; memfd_alloc_file() local [all...] |
| /linux/tools/testing/ktest/examples/bootconfigs/ |
| H A D | verify-functiongraph.sh | 6 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 …]
|
| H A D | verify-tracing.sh | 6 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 …]
|
| H A D | verify-boottrace.sh | 6 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 …]
|
| /linux/drivers/media/pci/cx18/ |
| H A D | cx18-ioctl.c | 52 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 D | debugfs.c | 25 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/include/linux/ |
| H A D | file.h | 16 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, 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); 67 extern struct file *fget_raw(unsigned int fd); [all …]
|
| /linux/drivers/xen/xenfs/ |
| H A D | xenstored.c | 12 static ssize_t xsd_read(struct file *file, char __user *buf, in xsd_read() argument 15 const char *str = (const char *)file->private_data; in xsd_read() 19 static int xsd_release(struct inode *inode, struct file *file) in xsd_release() argument 21 kfree(file->private_data); in xsd_release() 25 static int xsd_kva_open(struct inode *inode, struct file *file) in xsd_kva_open() argument 27 file->private_data = (void *)kasprintf(GFP_KERNEL, "0x%p", in xsd_kva_open() 29 if (!file->private_data) in xsd_kva_open() 34 static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma) in xsd_kva_mmap() argument 56 static int xsd_port_open(struct inode *inode, struct file *file) in xsd_port_open() argument 58 file->private_data = (void *)kasprintf(GFP_KERNEL, "%d", in xsd_port_open() [all …]
|
| /linux/tools/testing/selftests/coredump/ |
| H A D | stackdump_test.c | 37 FILE *file; in FIXTURE_SETUP() local 42 file = fopen("/proc/sys/kernel/core_pattern", "r"); in FIXTURE_SETUP() 43 ASSERT_NE(NULL, file); in FIXTURE_SETUP() 45 ret = fread(self->original_core_pattern, 1, sizeof(self->original_core_pattern), file); in FIXTURE_SETUP() 46 ASSERT_TRUE(ret || feof(file)); in FIXTURE_SETUP() 53 ret = fclose(file); in FIXTURE_SETUP() 60 FILE *file; in FIXTURE_TEARDOWN() local 72 file = fopen("/proc/sys/kernel/core_pattern", "w"); in FIXTURE_TEARDOWN() 73 if (!file) { in FIXTURE_TEARDOWN() 78 ret = fprintf(file, "%s", self->original_core_pattern); in FIXTURE_TEARDOWN() [all …]
|
| /linux/virt/kvm/ |
| H A D | vfio.c | 10 #include <linux/file.h> 26 struct file *file; member 38 static void kvm_vfio_file_set_kvm(struct file *file, struct kvm *kvm) in kvm_vfio_file_set_kvm() argument 40 void (*fn)(struct file *file, struct kvm *kvm); in kvm_vfio_file_set_kvm() 46 fn(file, kvm); in kvm_vfio_file_set_kvm() 51 static bool kvm_vfio_file_enforced_coherent(struct file *file) in kvm_vfio_file_enforced_coherent() argument 67 kvm_vfio_file_is_valid(struct file * file) kvm_vfio_file_is_valid() argument 84 kvm_vfio_file_iommu_group(struct file * file) kvm_vfio_file_iommu_group() argument [all...] |
| /linux/drivers/media/test-drivers/vivid/ |
| H A D | vivid-touch-cap.h | 29 int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f); 30 int vivid_g_fmt_tch(struct file *file, void *priv, struct v4l2_format *f); 31 int vivid_g_fmt_tch_mplane(struct file *file, void *priv, struct v4l2_format *f); 32 int vivid_enum_input_tch(struct file *file, void *priv, struct v4l2_input *inp); 33 int vivid_g_input_tch(struct file *file, void *priv, unsigned int *i); 34 int vivid_s_input_tch(struct file *file, void *priv, unsigned int i); 37 int vivid_g_parm_tch(struct file *file, void *priv,
|
| /linux/drivers/net/wireless/mediatek/mt7601u/ |
| H A D | debugfs.c | 33 mt7601u_ampdu_stat_show(struct seq_file *file, void *data) in mt7601u_ampdu_stat_show() argument 35 struct mt7601u_dev *dev = file->private; in mt7601u_ampdu_stat_show() 39 seq_printf(file, #name ":\t%llu\n", dev->stats.grp[off]) in mt7601u_ampdu_stat_show() 62 seq_puts(file, "Aggregations stats:\n"); in mt7601u_ampdu_stat_show() 65 seq_printf(file, "%08llx ", in mt7601u_ampdu_stat_show() 67 seq_putc(file, '\n'); in mt7601u_ampdu_stat_show() 70 seq_printf(file, "recent average AMPDU len: %d\n", in mt7601u_ampdu_stat_show() 79 mt7601u_eeprom_param_show(struct seq_file *file, void *data) in mt7601u_eeprom_param_show() argument 81 struct mt7601u_dev *dev = file->private; in mt7601u_eeprom_param_show() 86 seq_printf(file, "RF freq offset: %hhx\n", dev->ee->rf_freq_off); in mt7601u_eeprom_param_show() [all …]
|