/* The following functions handle opens on a file that displays a pidlist (tasks or procs). Prepare an array of the process/thread IDs of whoever's in the cgroup.  */
static int cgroup_pidlist_open(struct file *file, enum cgroup_filetype type)
/* The following functions handle opens on a file that displays a pidlist (tasks or procs). Prepare an array of the process/thread IDs of whoever's in the cgroup.  */
static int cgroup_pidlist_open(struct file *file, enum cgroup_filetype type)
{
	struct cgroup *cgrp = __d_cgrp(file->f_dentry->d_parent);
	struct cgroup_pidlist *l;
	int retval;
	if (!(file->f_mode & FMODE_READ))
		return 0;
	retval = pidlist_array_load(cgrp, type, &l);
	if (retval)
		return retval;
	file->f_op = &cgroup_pidlist_operations;
	retval = seq_open(file, &cgroup_pidlist_seq_operations);
	if (retval) {
		cgroup_release_pid_array(l);
		return retval;
	}
	((struct seq_file *)file->private_data)->private = l;
	return 0;
}