/* kthread which checks for tasks stuck in D state  */
static int watchdog(void *dummy)
/* kthread which checks for tasks stuck in D state  */
static int watchdog(void *dummy)
{
	set_user_nice(current, 0);
	for ( ; ; ) {
		unsigned long timeout = sysctl_hung_task_timeout_secs;
		while (schedule_timeout_interruptible(timeout_jiffies(timeout)))
			timeout = sysctl_hung_task_timeout_secs;
		check_hung_uninterruptible_tasks(timeout);
	}
	return 0;
}