[PATCH] cond_resched_lock() doesn't work in 2.6.18
When CONFIG_PREEMPT=n, cond_resched_lock() and cond_resched_softirq()
don't work, since they check for preempt_count to be sane,
but this counter is not tracked w/o preemption and is always 0.
So the fix is:
- ignore preempt count when CONFIG_PREEMPT=n
- plus if we want to check preempt_count in CONFIG_PREEMPT=y case
(just to be on the safe side), we need to account lock_kernel()
effect on preempt_count correctly.