why don't unlock_buffer call directly clear_and_wake_up_bit?

shuo chen <[email protected]> Sat, 21 Mar 2026 07:54:39 +0000
Newsgroups org.kernelnewbies.kernelnewbies
Message-ID <[email protected]>
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);
}


_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies