why don't unlock_buffer call directly clear_and_wake_up_bit?

shuo chen 1289151713 at qq.com
Sat Mar 21 03:54:39 EDT 2026


The unlock_buffer and clear_and_wake_up_bit call same the three function in the same sequence:
1.clear_bit_unlock 
2.smp_mb__after_atomic
3.wake_up_bit

So why don't unlock_buffer write the fllowing:
void unlock_buffer(struct buffer_head *bh)
{
	clear_and_wake_up_bit(BH_Lock,&bh->b_state);
}




More information about the Kernelnewbies mailing list