• Samuel Thibault's avatar
    [PATCH] spin_unlock_bh() and preempt_check_resched() · 10f02d1c
    Samuel Thibault authored
    In _spin_unlock_bh(lock):
    	do { \
    		_raw_spin_unlock(lock); \
    		preempt_enable(); \
    		local_bh_enable(); \
    		__release(lock); \
    	} while (0)
    there is no reason for using preempt_enable() instead of a simple
    Since we know bottom halves are disabled, preempt_schedule() will always
    return at once (preempt_count!=0), and hence preempt_check_resched() is
    useless here...
    This fixes it by using "preempt_enable_no_resched()" instead of the
    "preempt_enable()", and thus avoids the useless preempt_check_resched()
    just before re-enabling bottom halves.
    Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>