Two rather small optimizations found while going through driver
code:
1) Use the cheaper alternative to set_current_state() as we are
sure the task will block right afterward.
2) Checks for list_empty without the scan_mutex. The list_empty
function is very much designed to work without locks, obviously
as long as the head (scan_q) is reliable. In this case if another
thread is doing add_to_scan_list(), we still buckle in the outer
loop, so it will be caught upon the next iteration -- and if
kthread_should_stop() hits, it does not matter _anyway_ as we'd
still need to abort the function regardless of the status of
the scan_q.