/* can_nice - check if a task can reduce its nice value  */
int can_nice(const struct task_struct *p, const int nice)
/* can_nice - check if a task can reduce its nice value  */
int can_nice(const struct task_struct *p, const int nice)
{
	int nice_rlim = 20 - nice;
	return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
		capable(CAP_SYS_NICE));
}