[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190107.072507.2123333109511407402.davem@davemloft.net>
Date:   Mon, 07 Jan 2019 07:25:07 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     ap420073@...il.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        daniel@...earbox.net, ast@...nel.org, mcgrof@...nel.org
Subject: Re: [PATCH net v3 1/4] umh: add exit routine for UMH process
From: Taehee Yoo <ap420073@...il.com>
Date: Mon,  7 Jan 2019 21:10:14 +0900
> @@ -679,6 +688,29 @@ static int proc_cap_handler(struct ctl_table *table, int write,
>  	return 0;
>  }
>  
> +void exit_umh(struct task_struct *tsk)
> +{
> +	struct umh_info *info;
> +	pid_t pid = tsk->pid;
> +
> +	if (!(tsk->flags & PF_UMH))
> +		return;
Let's really make this low cost.
In linux/sched.h or similar:
void __exit_umh(struct task_struct *tsk);
static inline void exit_umh(struct task_struct *tsk)
{
	if (unlikely(tsk->flags & PF_UMH))
		__exit_umh(tsk);
}
Thank you.
Powered by blists - more mailing lists
 
