Re: [PATCH 10/12] cgroup: attach cgroup_open_file to all cgroup files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -2353,10 +2338,18 @@ static int cgroup_file_open(struct inode *inode, struct file *file)
>  	WARN_ON_ONCE(cfe->css && cfe->css != css);
>  	cfe->css = css;
>  
> -	if (cft->open)
> +	if (cft->open) {
>  		err = cft->open(inode, file);
> -	else
> -		err = single_open(file, cgroup_seqfile_show, cfe);
> +	} else {
> +		err = single_open_size(file, cgroup_seqfile_show, cfe,
> +				       sizeof(struct cgroup_open_file));

This is wrong.

I guess you wanted to use single_open_private(), which doesn't exist.

> +		if (!err) {
> +			struct seq_file *sf = file->private_data;
> +			struct cgroup_open_file *of = sf->private;
> +
> +			of->cfe = cfe;
> +		}
> +	}
>  
>  	if (css->ss && err)
>  		css_put(css);

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers




[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux