Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
None
-
9223372036854775807
Description
The construct:
set_current_state(TASK_UNINTERRUPTIABLE); schedule_timeout(time);
Is more clearly expressed as
schedule_timeout_uninterruptible(time);
And similarly with TASK_INTERRUPTIBLE / schedule_timeout_interruptible()
Establishing this practice makes it harder to forget to call set_current_state() as has happened a couple of times - in lnet_peer_discovery and mdd_changelog_fini().
Also, there is no need to set_current_state(TASK_RUNNABLE) after calling schedule*(). That state is guaranteed to have been set.