[PATCH] simplify and generalise cond_resched_lock
cond_resched_lock() _used_ to be "if this is the only lock which I am holding then drop it and schedule if needed". However with the i_shared_lock->i_shared_sem change, neither of its two callsites now need those semantics. So this patch changes it to mean just "if needed, drop this lock and reschedule". This allows us to also schedule if CONFIG_PREEMPT=n, which is useful - zap_page_range() can run for an awfully long time. The preempt and non-preempt versions of cond_resched_lock() have been unified.
Showing
Please register or sign in to comment