Lines Matching refs:buf
1469 char *buf) in cgroup_file_name() argument
1477 snprintf(buf, CGROUP_FILE_NAME_MAX, "%s%s.%s", in cgroup_file_name()
1481 strscpy(buf, cft->name, CGROUP_FILE_NAME_MAX); in cgroup_file_name()
1483 return buf; in cgroup_file_name()
1793 char *buf = NULL; in cgroup_show_path() local
1797 buf = kmalloc(PATH_MAX, GFP_KERNEL); in cgroup_show_path()
1798 if (!buf) in cgroup_show_path()
1803 len = kernfs_path_from_node(kf_node, ns_cgroup->kn, buf, PATH_MAX); in cgroup_show_path()
1809 seq_escape(sf, buf, " \t\n\\"); in cgroup_show_path()
1812 kfree(buf); in cgroup_show_path()
2290 int cgroup_path_ns_locked(struct cgroup *cgrp, char *buf, size_t buflen, in cgroup_path_ns_locked() argument
2295 return kernfs_path_from_node(cgrp->kn, root->kn, buf, buflen); in cgroup_path_ns_locked()
2298 int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen, in cgroup_path_ns() argument
2306 ret = cgroup_path_ns_locked(cgrp, buf, buflen, ns); in cgroup_path_ns()
2328 int task_cgroup_path(struct task_struct *task, char *buf, size_t buflen) in task_cgroup_path() argument
2342 ret = cgroup_path_ns_locked(cgrp, buf, buflen, &init_cgroup_ns); in task_cgroup_path()
2345 ret = strlcpy(buf, "/", buflen); in task_cgroup_path()
2828 struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup) in cgroup_procs_write_start() argument
2834 if (kstrtoint(strstrip(buf), 0, &pid) || pid < 0) in cgroup_procs_write_start()
3275 char *buf, size_t nbytes, in cgroup_subtree_control_write() argument
3288 buf = strstrip(buf); in cgroup_subtree_control_write()
3289 while ((tok = strsep(&buf, " "))) { in cgroup_subtree_control_write()
3441 static ssize_t cgroup_type_write(struct kernfs_open_file *of, char *buf, in cgroup_type_write() argument
3448 if (strcmp(strstrip(buf), "threaded")) in cgroup_type_write()
3476 char *buf, size_t nbytes, loff_t off) in cgroup_max_descendants_write() argument
3482 buf = strstrip(buf); in cgroup_max_descendants_write()
3483 if (!strcmp(buf, "max")) { in cgroup_max_descendants_write()
3486 ret = kstrtoint(buf, 0, &descendants); in cgroup_max_descendants_write()
3519 char *buf, size_t nbytes, loff_t off) in cgroup_max_depth_write() argument
3525 buf = strstrip(buf); in cgroup_max_depth_write()
3526 if (!strcmp(buf, "max")) { in cgroup_max_depth_write()
3529 ret = kstrtoint(buf, 0, &depth); in cgroup_max_depth_write()
3624 static ssize_t cgroup_pressure_write(struct kernfs_open_file *of, char *buf, in cgroup_pressure_write() argument
3637 new = psi_trigger_create(&cgrp->psi, buf, nbytes, res); in cgroup_pressure_write()
3651 char *buf, size_t nbytes, in cgroup_io_pressure_write() argument
3654 return cgroup_pressure_write(of, buf, nbytes, PSI_IO); in cgroup_io_pressure_write()
3658 char *buf, size_t nbytes, in cgroup_memory_pressure_write() argument
3661 return cgroup_pressure_write(of, buf, nbytes, PSI_MEM); in cgroup_memory_pressure_write()
3665 char *buf, size_t nbytes, in cgroup_cpu_pressure_write() argument
3668 return cgroup_pressure_write(of, buf, nbytes, PSI_CPU); in cgroup_cpu_pressure_write()
3693 char *buf, size_t nbytes, loff_t off) in cgroup_freeze_write() argument
3699 ret = kstrtoint(strstrip(buf), 0, &freeze); in cgroup_freeze_write()
3734 static ssize_t cgroup_file_write(struct kernfs_open_file *of, char *buf, in cgroup_file_write() argument
3755 return cft->write(of, buf, nbytes, off); in cgroup_file_write()
3769 ret = kstrtoull(buf, 0, &v); in cgroup_file_write()
3774 ret = kstrtoll(buf, 0, &v); in cgroup_file_write()
4753 char *buf, size_t nbytes, loff_t off) in cgroup_procs_write() argument
4763 task = cgroup_procs_write_start(buf, true); in cgroup_procs_write()
4794 char *buf, size_t nbytes, loff_t off) in cgroup_threads_write() argument
4800 buf = strstrip(buf); in cgroup_threads_write()
4806 task = cgroup_procs_write_start(buf, false); in cgroup_threads_write()
5840 char *buf, size_t buflen) in cgroup_path_from_kernfs_id() argument
5847 kernfs_path(kn, buf, buflen); in cgroup_path_from_kernfs_id()
5859 char *buf; in proc_cgroup_show() local
5864 buf = kmalloc(PATH_MAX, GFP_KERNEL); in proc_cgroup_show()
5865 if (!buf) in proc_cgroup_show()
5902 retval = cgroup_path_ns_locked(cgrp, buf, PATH_MAX, in proc_cgroup_show()
5909 seq_puts(m, buf); in proc_cgroup_show()
5924 kfree(buf); in proc_cgroup_show()
6444 static ssize_t show_delegatable_files(struct cftype *files, char *buf, in show_delegatable_files() argument
6455 ret += snprintf(buf + ret, size - ret, "%s.", prefix); in show_delegatable_files()
6457 ret += snprintf(buf + ret, size - ret, "%s\n", cft->name); in show_delegatable_files()
6467 char *buf) in delegate_show() argument
6473 ret = show_delegatable_files(cgroup_base_files, buf, PAGE_SIZE - ret, in delegate_show()
6477 ret += show_delegatable_files(ss->dfl_cftypes, buf + ret, in delegate_show()
6486 char *buf) in features_show() argument
6488 return snprintf(buf, PAGE_SIZE, "nsdelegate\nmemory_localevents\n"); in features_show()