}
+ flush_signals(current);
+
/*
* Check whether there's a new lockd process before
* shutting down the hosts and clearing the slot.
printk(KERN_DEBUG
"lockd: new process, skipping host shutdown\n");
wake_up(&lockd_exit);
-
+
/* Exit the RPC thread */
svc_exit_thread(rqstp);
lockd_down(void)
{
static int warned;
- wait_queue_t __wait;
- int retries=0;
down(&nlmsvc_sema);
if (nlmsvc_users) {
warned = 0;
kill_proc(nlmsvc_pid, SIGKILL, 1);
-
- init_waitqueue_entry(&__wait, current);
- add_wait_queue(&lockd_exit, &__wait);
-
/*
* Wait for the lockd process to exit, but since we're holding
* the lockd semaphore, we can't wait around forever ...
*/
clear_thread_flag(TIF_SIGPENDING);
- set_current_state(TASK_UNINTERRUPTIBLE);
- while (nlmsvc_pid) {
-
- schedule_timeout(HZ);
- if (retries++ < 3)
- continue;
-
+ interruptible_sleep_on_timeout(&lockd_exit, HZ);
+ if (nlmsvc_pid) {
printk(KERN_WARNING
"lockd_down: lockd failed to exit, clearing pid\n");
nlmsvc_pid = 0;
}
- set_current_state(TASK_RUNNING);
- remove_wait_queue(&lockd_exit, &__wait);
-
spin_lock_irq(¤t->sighand->siglock);
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
-
out:
up(&nlmsvc_sema);
}
.ctl_name = CTL_UNNUMBERED,
.procname = "nlm_grace_period",
.data = &nlm_grace_period,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned long),
.mode = 0644,
.proc_handler = &proc_doulongvec_minmax,
.extra1 = (unsigned long *) &nlm_grace_period_min,
.ctl_name = CTL_UNNUMBERED,
.procname = "nlm_timeout",
.data = &nlm_timeout,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned long),
.mode = 0644,
.proc_handler = &proc_doulongvec_minmax,
.extra1 = (unsigned long *) &nlm_timeout_min,