/kernel/linux/linux-5.10/fs/ |
H A D | file.c | 51 * space if any. This does not copy the file pointers. Called with the files 74 * clear the extra space. Called with the files spinlock held for write. 167 * The files->file_lock should be held on entry, and will be held on exit. 169 static int expand_fdtable(struct files_struct *files, unsigned int nr) 170 __releases(files->file_lock) 171 __acquires(files->file_lock) 175 spin_unlock(&files->file_lock); 181 if (atomic_read(&files->count) > 1) 184 spin_lock(&files->file_lock); 195 cur_fdt = files_fdtable(files); 412 close_files(struct files_struct * files) close_files() argument 446 struct files_struct *files; get_files_struct() local 457 put_files_struct(struct files_struct *files) put_files_struct() argument 469 reset_files_struct(struct files_struct *files) reset_files_struct() argument 483 struct files_struct * files = tsk->files; exit_files() local 524 __alloc_fd(struct files_struct *files, unsigned start, unsigned end, unsigned flags) __alloc_fd() argument 598 __put_unused_fd(struct files_struct *files, unsigned int fd) __put_unused_fd() argument 608 struct files_struct *files = current->files; put_unused_fd() local 636 __fd_install(struct files_struct *files, unsigned int fd, struct file *file) __fd_install() argument 671 pick_file(struct files_struct *files, unsigned fd) pick_file() argument 695 __close_fd(struct files_struct *files, unsigned fd) __close_fd() argument 791 struct files_struct *files = current->files; __close_fd_get_file() local 818 struct files_struct *files = current->files; close_fd_get_file() local 828 do_close_on_exec(struct files_struct *files) do_close_on_exec() argument 864 __fget_files_rcu(struct files_struct *files, unsigned int fd, fmode_t mask, unsigned int refs) __fget_files_rcu() argument 919 __fget_files(struct files_struct *files, unsigned int fd, fmode_t mask, unsigned int refs) __fget_files() argument 984 struct files_struct *files = current->files; __fget_light() local 1051 struct files_struct *files = current->files; set_close_on_exec() local 1064 struct files_struct *files = current->files; get_close_on_exec() local 1121 struct files_struct *files = current->files; replace_fd() local 1200 struct files_struct *files = current->files; ksys_dup3() local 1238 struct files_struct *files = current->files; SYSCALL_DEFINE2() local 1278 iterate_fd(struct files_struct *files, unsigned n, int (*f)(const void *, struct file *, unsigned), const void *p) iterate_fd() argument [all...] |
/kernel/linux/linux-6.6/fs/ |
H A D | file.c | 51 * space if any. This does not copy the file pointers. Called with the files 74 * clear the extra space. Called with the files spinlock held for write. 167 * The files->file_lock should be held on entry, and will be held on exit. 169 static int expand_fdtable(struct files_struct *files, unsigned int nr) 170 __releases(files->file_lock) 171 __acquires(files->file_lock) 175 spin_unlock(&files->file_lock); 181 if (atomic_read(&files->count) > 1) 184 spin_lock(&files->file_lock); 195 cur_fdt = files_fdtable(files); 412 close_files(struct files_struct * files) close_files() argument 444 put_files_struct(struct files_struct *files) put_files_struct() argument 458 struct files_struct * files = tsk->files; exit_files() local 501 struct files_struct *files = current->files; alloc_fd() local 568 __put_unused_fd(struct files_struct *files, unsigned int fd) __put_unused_fd() argument 578 struct files_struct *files = current->files; put_unused_fd() local 604 struct files_struct *files = current->files; fd_install() local 637 pick_file(struct files_struct *files, unsigned fd) pick_file() argument 656 struct files_struct *files = current->files; close_fd() local 696 __range_close(struct files_struct *files, unsigned int fd, unsigned int max_fd) __range_close() argument 810 struct files_struct *files = current->files; close_fd_get_file() local 820 do_close_on_exec(struct files_struct *files) do_close_on_exec() argument 856 __fget_files_rcu(struct files_struct *files, unsigned int fd, fmode_t mask) __fget_files_rcu() argument 910 __fget_files(struct files_struct *files, unsigned int fd, fmode_t mask) __fget_files() argument 954 struct files_struct *files; task_lookup_fd_rcu() local 969 struct files_struct *files; task_lookup_next_fd_rcu() local 1006 struct files_struct *files = current->files; __fget_light() local 1082 struct files_struct *files = current->files; set_close_on_exec() local 1095 struct files_struct *files = current->files; get_close_on_exec() local 1152 struct files_struct *files = current->files; replace_fd() local 1236 struct files_struct *files = current->files; ksys_dup3() local 1274 struct files_struct *files = current->files; SYSCALL_DEFINE2() local 1315 iterate_fd(struct files_struct *files, unsigned n, int (*f)(const void *, struct file *, unsigned), const void *p) iterate_fd() argument [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | fdtable.h | 74 #define rcu_dereference_check_fdtable(files, fdtfd) \ 75 rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock)) 77 #define files_fdtable(files) \ 78 rcu_dereference_check_fdtable((files), (files)->fdt) 83 static inline struct file *files_lookup_fd_raw(struct files_struct *files, unsigned int fd) in files_lookup_fd_raw() argument 85 struct fdtable *fdt = rcu_dereference_raw(files->fdt); in files_lookup_fd_raw() 94 static inline struct file *files_lookup_fd_locked(struct files_struct *files, unsigned int fd) in files_lookup_fd_locked() argument 96 RCU_LOCKDEP_WARN(!lockdep_is_held(&files->file_lock), in files_lookup_fd_locked() 98 return files_lookup_fd_raw(files, f in files_lookup_fd_locked() 101 fcheck_files(struct files_struct *files, unsigned int fd) fcheck_files() argument [all...] |
/kernel/linux/linux-5.10/fs/proc/ |
H A D | fd.c | 22 struct files_struct *files = NULL; in seq_show() local 31 files = get_files_struct(task); in seq_show() 34 if (files) { in seq_show() 37 spin_lock(&files->file_lock); in seq_show() 38 file = files_lookup_fd_locked(files, fd); in seq_show() 40 struct fdtable *fdt = files_fdtable(files); in seq_show() 49 spin_unlock(&files->file_lock); in seq_show() 50 put_files_struct(files); in seq_show() 60 show_fd_locks(m, file, files); in seq_show() 86 struct files_struct *files in tid_fd_mode() local 149 struct files_struct *files = NULL; proc_fd_link() local 232 struct files_struct *files; proc_readfd_common() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | fdtable.h | 74 #define rcu_dereference_check_fdtable(files, fdtfd) \ 75 rcu_dereference_check((fdtfd), lockdep_is_held(&(files)->file_lock)) 77 #define files_fdtable(files) \ 78 rcu_dereference_check_fdtable((files), (files)->fdt) 83 static inline struct file *files_lookup_fd_raw(struct files_struct *files, unsigned int fd) in files_lookup_fd_raw() argument 85 struct fdtable *fdt = rcu_dereference_raw(files->fdt); in files_lookup_fd_raw() 94 static inline struct file *files_lookup_fd_locked(struct files_struct *files, unsigned int fd) in files_lookup_fd_locked() argument 96 RCU_LOCKDEP_WARN(!lockdep_is_held(&files->file_lock), in files_lookup_fd_locked() 98 return files_lookup_fd_raw(files, f in files_lookup_fd_locked() 101 files_lookup_fd_rcu(struct files_struct *files, unsigned int fd) files_lookup_fd_rcu() argument [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/gt/ |
H A D | intel_gt_debugfs.c | 75 static const struct intel_gt_debugfs_file files[] = { in gt_debugfs_register() local 80 intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), gt); in gt_debugfs_register() 106 const struct intel_gt_debugfs_file *files, in intel_gt_debugfs_register_files() 110 umode_t mode = files->fops->write ? 0644 : 0444; in intel_gt_debugfs_register_files() 112 if (!files->eval || files->eval(data)) in intel_gt_debugfs_register_files() 113 debugfs_create_file(files->name, in intel_gt_debugfs_register_files() 115 files->fops); in intel_gt_debugfs_register_files() 117 files in intel_gt_debugfs_register_files() 105 intel_gt_debugfs_register_files(struct dentry *root, const struct intel_gt_debugfs_file *files, unsigned long count, void *data) intel_gt_debugfs_register_files() argument [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/ |
H A D | debugfs_gt.c | 35 const struct debugfs_gt_file *files, in intel_gt_debugfs_register_files() 39 umode_t mode = files->fops->write ? 0644 : 0444; in intel_gt_debugfs_register_files() 40 if (!files->eval || files->eval(data)) in intel_gt_debugfs_register_files() 41 debugfs_create_file(files->name, in intel_gt_debugfs_register_files() 43 files->fops); in intel_gt_debugfs_register_files() 45 files++; in intel_gt_debugfs_register_files() 34 intel_gt_debugfs_register_files(struct dentry *root, const struct debugfs_gt_file *files, unsigned long count, void *data) intel_gt_debugfs_register_files() argument
|
/kernel/linux/linux-6.6/tools/perf/tests/ |
H A D | builtin-test-list.c | 35 static struct script_file *files = NULL; variable 131 pr_err("Too many script files\n"); in append_script() 136 files_tmp = realloc(files, in append_script() 143 files = files_tmp; in append_script() 145 files[files_num - 1].dir = strdup_check(dir); in append_script() 146 files[files_num - 1].file = strdup_check(file); in append_script() 147 files[files_num - 1].desc = strdup_check(desc); in append_script() 148 files[files_num].dir = NULL; in append_script() 149 files[files_num].file = NULL; in append_script() 150 files[files_nu in append_script() [all...] |
/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | data.c | 21 static void close_dir(struct perf_data_file *files, int nr) in close_dir() argument 24 close(files[nr].fd); in close_dir() 25 zfree(&files[nr].path); in close_dir() 27 free(files); in close_dir() 32 close_dir(data->dir.files, data->dir.nr); in perf_data__close_dir() 37 struct perf_data_file *files = NULL; in perf_data__create_dir() local 43 files = zalloc(nr * sizeof(*files)); in perf_data__create_dir() 44 if (!files) in perf_data__create_dir() 48 struct perf_data_file *file = &files[ in perf_data__create_dir() 73 struct perf_data_file *files = NULL; perf_data__open_dir() local [all...] |
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | data.c | 22 static void close_dir(struct perf_data_file *files, int nr) in close_dir() argument 25 close(files[nr].fd); in close_dir() 26 zfree(&files[nr].path); in close_dir() 28 free(files); in close_dir() 33 close_dir(data->dir.files, data->dir.nr); in perf_data__close_dir() 38 struct perf_data_file *files = NULL; in perf_data__create_dir() local 44 files = zalloc(nr * sizeof(*files)); in perf_data__create_dir() 45 if (!files) in perf_data__create_dir() 49 struct perf_data_file *file = &files[ in perf_data__create_dir() 78 struct perf_data_file *files = NULL; perf_data__open_dir() local [all...] |
/kernel/liteos_a/fs/vfs/operation/ |
H A D | vfs_cloexec.c | 42 void CloseOnExec(struct files_struct *files) in CloseOnExec() argument 45 if ((files == NULL) || (files->fdt == NULL)) { in CloseOnExec() 49 for (int i = 0; i < files->fdt->max_fds; i++) { in CloseOnExec() 50 if (FD_ISSET(i, files->fdt->proc_fds) && in CloseOnExec() 51 FD_ISSET(i, files->fdt->cloexec_fds)) { in CloseOnExec()
|
H A D | vfs_other.c | 139 spin_lock_irqsave(&curr->files->workdir_lock, lock_flags); in SetWorkDir() 140 ret = strncpy_s(curr->files->workdir, PATH_MAX, dir, len); in SetWorkDir() 141 curr->files->workdir[PATH_MAX - 1] = '\0'; in SetWorkDir() 142 spin_unlock_irqrestore(&curr->files->workdir_lock, lock_flags); in SetWorkDir() 235 spin_lock_irqsave(&curr->files->workdir_lock, lock_flags); in getcwd() 236 len = strlen(curr->files->workdir); in getcwd() 239 spin_unlock_irqrestore(&curr->files->workdir_lock, lock_flags); in getcwd() 242 ret = memcpy_s(buf, n, curr->files->workdir, len + 1); in getcwd() 245 spin_unlock_irqrestore(&curr->files->workdir_lock, lock_flags); in getcwd() 248 spin_unlock_irqrestore(&curr->files in getcwd() [all...] |
/kernel/linux/linux-6.6/include/drm/ |
H A D | drm_debugfs.h | 13 * copy of this software and associated documentation files (the "Software"), 142 void drm_debugfs_create_files(const struct drm_info_list *files, 145 int drm_debugfs_remove_files(const struct drm_info_list *files, 152 const struct drm_debugfs_info *files, int count); 157 static inline void drm_debugfs_create_files(const struct drm_info_list *files, in drm_debugfs_create_files() argument 162 static inline int drm_debugfs_remove_files(const struct drm_info_list *files, in drm_debugfs_remove_files() argument 174 const struct drm_debugfs_info *files, in drm_debugfs_add_files() 173 drm_debugfs_add_files(struct drm_device *dev, const struct drm_debugfs_info *files, int count) drm_debugfs_add_files() argument
|
/kernel/linux/linux-5.10/kernel/ |
H A D | kcmp.c | 69 if (task->files) in get_file_raw_ptr() 70 file = fcheck_files(task->files, idx); in get_file_raw_ptr() 110 struct files_struct *files; in kcmp_epoll_target() local 119 files = get_files_struct(task2); in kcmp_epoll_target() 120 if (!files) in kcmp_epoll_target() 123 spin_lock(&files->file_lock); in kcmp_epoll_target() 124 filp_epoll = fcheck_files(files, slot.efd); in kcmp_epoll_target() 129 spin_unlock(&files->file_lock); in kcmp_epoll_target() 130 put_files_struct(files); in kcmp_epoll_target() 203 ret = kcmp_ptr(task1->files, task in SYSCALL_DEFINE5() [all...] |
/kernel/liteos_a/testsuites/unittest/tools/ |
H A D | unittest_tools.cpp | 172 static void RunAllTestCase(vector<string> files, struct TestsuitesParam *param) in RunAllTestCase() argument 187 for (size_t i = 0; i < files.size(); i++) { in RunAllTestCase() 188 int fileLen = strlen(files[i].c_str()); in RunAllTestCase() 190 if (strcmp((char *)(files[i].c_str() + (fileLen - unittestRunLen)), unittestRun) == 0) { in RunAllTestCase() 196 if (!TestsuitesIsSmoke(files[i], fileLen, smokeTest, smokeTestLen)) { in RunAllTestCase() 200 if (TestsuitesIsSmoke(files[i], fileLen, smokeTest, smokeTestLen)) { in RunAllTestCase() 206 execParam[0] = (char *)files[i].c_str(); in RunAllTestCase() 207 RunCase(files[i].c_str(), execParam); in RunAllTestCase() 347 static void IsCase(vector<string> files, struct TestCase *testCase) in IsCase() argument 349 for (size_t i = 0; i < files in IsCase() 373 FindTestCase(vector<string> files) FindTestCase() argument 443 vector<string> files = GetAllTestsuites(g_param.testsuitesDir); main() local [all...] |
/kernel/linux/linux-5.10/include/drm/ |
H A D | drm_debugfs.h | 13 * copy of this software and associated documentation files (the "Software"), 83 void drm_debugfs_create_files(const struct drm_info_list *files, 86 int drm_debugfs_remove_files(const struct drm_info_list *files, 89 static inline void drm_debugfs_create_files(const struct drm_info_list *files, in drm_debugfs_create_files() argument 94 static inline int drm_debugfs_remove_files(const struct drm_info_list *files, in drm_debugfs_remove_files() argument
|
/kernel/linux/linux-5.10/drivers/gpu/drm/qxl/ |
H A D | qxl_debugfs.c | 5 * a copy of this software and associated documentation files (the 96 struct drm_info_list *files, in qxl_debugfs_add_files() 102 if (qdev->debugfs[i].files == files) { in qxl_debugfs_add_files() 114 qdev->debugfs[qdev->debugfs_count].files = files; in qxl_debugfs_add_files() 118 drm_debugfs_create_files(files, nfiles, in qxl_debugfs_add_files() 95 qxl_debugfs_add_files(struct qxl_device *qdev, struct drm_info_list *files, unsigned int nfiles) qxl_debugfs_add_files() argument
|
/kernel/linux/linux-6.6/drivers/gpu/drm/qxl/ |
H A D | qxl_debugfs.c | 5 * a copy of this software and associated documentation files (the 100 struct drm_info_list *files, in qxl_debugfs_add_files() 106 if (qdev->debugfs[i].files == files) { in qxl_debugfs_add_files() 118 qdev->debugfs[qdev->debugfs_count].files = files; in qxl_debugfs_add_files() 122 drm_debugfs_create_files(files, nfiles, in qxl_debugfs_add_files() 99 qxl_debugfs_add_files(struct qxl_device *qdev, struct drm_info_list *files, unsigned int nfiles) qxl_debugfs_add_files() argument
|
/kernel/linux/linux-5.10/kernel/bpf/ |
H A D | task_iter.c | 41 task->files == task->group_leader->files) { in task_seq_get_next() 133 struct files_struct *files; member 154 curr_files = info->files; in task_file_seq_get_next() 160 info->files = NULL; in task_file_seq_get_next() 173 info->files = curr_files; in task_file_seq_get_next() 205 info->files = NULL; in task_file_seq_get_next() 217 info->files = NULL; in task_file_seq_start() 279 put_files_struct(info->files); in task_file_seq_stop() 281 info->files in task_file_seq_stop() [all...] |
/kernel/linux/linux-6.6/io_uring/ |
H A D | openclose.c | 221 struct files_struct *files = current->files; in io_close() local 232 spin_lock(&files->file_lock); in io_close() 233 fdt = files_fdtable(files); in io_close() 235 spin_unlock(&files->file_lock); in io_close() 239 lockdep_is_held(&files->file_lock)); in io_close() 241 spin_unlock(&files->file_lock); in io_close() 247 spin_unlock(&files->file_lock); in io_close() 252 spin_unlock(&files->file_lock); in io_close() 257 ret = filp_close(file, current->files); in io_close() [all...] |
H A D | filetable.c | 41 table->files = kvcalloc(nr_files, sizeof(table->files[0]), in io_alloc_file_tables() 43 if (unlikely(!table->files)) in io_alloc_file_tables() 48 kvfree(table->files); in io_alloc_file_tables() 57 kvfree(table->files); in io_free_file_tables() 59 table->files = NULL; in io_free_file_tables()
|
/kernel/linux/linux-5.10/tools/testing/selftests/pstore/ |
H A D | pstore_post_reboot_tests | 40 prlog -n "Checking dmesg files exist in pstore filesystem ... " 43 prlog -n "Checking console files exist in pstore filesystem ... " 46 prlog -n "Checking pmsg files exist in pstore filesystem ... " 49 prlog -n "Checking dmesg files contain oops end marker" 53 files=`ls dmesg-${backend}-*` 54 operate_files $? "$files" grep_end_trace 76 prlog -n "Removing all files in pstore filesystem " 77 files=`ls *-${backend}-*` 78 operate_files $? "$files" rm
|
/kernel/linux/linux-5.10/drivers/staging/comedi/drivers/ni_routing/tools/ |
H A D | Makefile | 2 # this make file is simply to help autogenerate these files: 12 @echo "\`make csv-files\`" 13 @echo " Creates new csv-files using content of c-files of existing" 14 @echo " ni_routing/* content. New csv files are placed in csv" 16 @echo "\`make c-files\`" 17 @echo " Creates new c-files using content of csv sub-directory. These" 18 @echo " new c-files can be compared to the active content in the" 25 @echo " Remove all generated files/directories EXCEPT for csv/c files [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/pstore/ |
H A D | pstore_post_reboot_tests | 40 prlog -n "Checking dmesg files exist in pstore filesystem ... " 43 prlog -n "Checking console files exist in pstore filesystem ... " 46 prlog -n "Checking pmsg files exist in pstore filesystem ... " 49 prlog -n "Checking dmesg files contain oops end marker" 53 files=`ls dmesg-${backend}-*` 54 operate_files $? "$files" grep_end_trace 76 prlog -n "Removing all files in pstore filesystem " 77 files=`ls *-${backend}-*` 78 operate_files $? "$files" rm
|
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/uc/ |
H A D | intel_huc_debugfs.c | 28 static const struct debugfs_gt_file files[] = { in intel_huc_debugfs_register() local 35 intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), huc); in intel_huc_debugfs_register()
|