[Devel] [PATCH rh7] ve/vznetstat: Don't destroy statistics until explicitly asked

Vladimir Davydov vdavydov at parallels.com
Fri Jul 24 07:57:48 PDT 2015


On Fri, Jul 24, 2015 at 05:17:49PM +0300, Cyrill Gorcunov wrote:

> @@ -1096,13 +1096,7 @@ static void __net_exit net_exit_acct(str
>  {
>  	struct ve_struct *ve = net->owner_ve;
>  
> -	if (ve->stat) {
> -		venet_acct_put_stat(ve->stat);
> -		if (atomic_read(&ve->stat->users) == 0) {
> -			venet_acct_destroy_stat(ve->veid);
> -			ve->stat = NULL;
> -		}
> -	}
> +	venet_acct_put_stat(ve->stat);

I think you'd better clear (w/o destruction) ve->stat here rather than
in venetstat_exit.



More information about the Devel mailing list