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);

--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux