-
Mr NeilBrown authored
The construct: set_current_state(TASK_UNINTERRUPTIBLE); 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. In mdd_changelog_fini() there was an attempt to sleep for 10 microseconds. This will always round up to 1 jiffy, so just make it schedule_timeout_uninterruptible(1). Finally a few places where the number of seconds was multiplied by 1, have had the '1 *' removed. Test-Parameters: trivial Signed-off-by:
Mr NeilBrown <neilb@suse.de> Change-Id: I01b37039de0bf7e07480de372c1a4cfe78a8cdd8 Reviewed-on: https://review.whamcloud.com/36656 Tested-by:
jenkins <devops@whamcloud.com> Tested-by:
Maloo <maloo@whamcloud.com> Reviewed-by:
Shaun Tancheff <shaun.tancheff@hpe.com> Reviewed-by:
James Simmons <jsimmons@infradead.org> Reviewed-by:
Oleg Drokin <green@whamcloud.com>
5c883ea2